treewide: fix shellscript syntax errors/typos
authorLorenzo Santina <lorenzo.santina@edu.unito.it>
Mon, 11 Sep 2017 13:27:53 +0000 (15:27 +0200)
committerMathias Kresin <dev@kresin.me>
Wed, 13 Sep 2017 06:07:54 +0000 (08:07 +0200)
Fix multiple syntax errors in shelscripts (of packages only)
These errors were causing many conditions to not working properly

Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it>
[increase PKG_RELEASE, drop command substitution from directip.sh]
Signed-off-by: Mathias Kresin <dev@kresin.em>
package/kernel/mac80211/Makefile
package/kernel/mac80211/files/lib/wifi/mac80211.sh
package/network/config/gre/Makefile
package/network/config/gre/files/gre.sh
package/network/services/hostapd/Makefile
package/network/services/hostapd/files/hostapd.sh
package/network/utils/comgt/Makefile
package/network/utils/comgt/files/3g.sh
package/network/utils/comgt/files/directip.sh
scripts/om-fwupgradecfg-gen.sh

index 1ac390d337c23cfb33be5f19de3281a4d83263f3..ab3d787d93d393859d5cf24577d89daa6a1a1397 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=mac80211
 
 PKG_VERSION:=2017-01-31
 PKG_NAME:=mac80211
 
 PKG_VERSION:=2017-01-31
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
 PKG_BACKPORT_VERSION:=
 PKG_HASH:=75e6d39e34cf156212a2509172a4a62b673b69eb4a1d9aaa565f7fa719fa2317
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
 PKG_BACKPORT_VERSION:=
 PKG_HASH:=75e6d39e34cf156212a2509172a4a62b673b69eb4a1d9aaa565f7fa719fa2317
index 4bfc7424b2cf6a4ac95f2b37f6723ecf1f0ec6f3..940fb52ac273a421823e3169907e39c84fedc2ea 100644 (file)
@@ -92,7 +92,7 @@ detect_mac80211() {
                        htmode="VHT80"
                }
 
                        htmode="VHT80"
                }
 
-               [ -n $htmode ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode"
+               [ -n "$htmode" ] && ht_capab="set wireless.radio${devidx}.htmode=$htmode"
 
                if [ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${dev} ]; then
                        path="$(readlink -f /sys/class/ieee80211/${dev}/device)"
 
                if [ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${dev} ]; then
                        path="$(readlink -f /sys/class/ieee80211/${dev}/device)"
index 9193f5c9fb70e222b03956277c776e030a71ce39..b191327f873c43eb958515afcc7f859da55a0cdb 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gre
 PKG_VERSION:=1
 
 PKG_NAME:=gre
 PKG_VERSION:=1
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
index a6b4ba85f6c762c4d61197aa126fc49d6ee7c71e..e604bfb259a990ad0cfe587449d0c67d8467b0fd 100755 (executable)
@@ -25,7 +25,7 @@ gre_generic_setup() {
        json_add_string mode "$mode"
        json_add_int mtu "${mtu:-1280}"
        [ -n "$df" ] && json_add_boolean df "$df"
        json_add_string mode "$mode"
        json_add_int mtu "${mtu:-1280}"
        [ -n "$df" ] && json_add_boolean df "$df"
-       [ -n "ttl" ] && json_add_int ttl "$ttl"
+       [ -n "$ttl" ] && json_add_int ttl "$ttl"
        [ -n "$tos" ] && json_add_string tos "$tos"
        json_add_boolean multicast "$multicast"
        json_add_string local "$local"
        [ -n "$tos" ] && json_add_string tos "$tos"
        json_add_boolean multicast "$multicast"
        json_add_string local "$local"
index 8a1f083217e72a75a9e7eacd058c4ce68cf82789..0e729a83e80c76813e3775dfae3cbd73852a4f95 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
index e1ec799ec77e882b8f9999a6262687072ae6eaaa..73ad6d67047601b52a4ec5cb393149c572c327c9 100644 (file)
@@ -627,7 +627,7 @@ wpa_supplicant_add_network() {
                scan_ssid=""
        }
 
                scan_ssid=""
        }
 
-       [[ "$_w_mode" = "adhoc" -o "$_w_mode" = "mesh" ]] && append network_data "$_w_modestr" "$N$T"
+       [ "$_w_mode" = "adhoc" -o "$_w_mode" = "mesh" ] && append network_data "$_w_modestr" "$N$T"
 
        case "$auth_type" in
                none) ;;
 
        case "$auth_type" in
                none) ;;
index ce99a2a6888629e2b7332d70ddf1dcadf6353b10..3b7f4b9022c420c3ccd7a372a9431d8afa8517b1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=comgt
 PKG_VERSION:=0.32
 
 PKG_NAME:=comgt
 PKG_VERSION:=0.32
-PKG_RELEASE:=29
+PKG_RELEASE:=30
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/comgt
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=@SF/comgt
index d438cb7a6d2390294919b6e80e5a21b1d7c69f71..0d02d4c4b989de24ebbe336749cc88373cf21eec 100644 (file)
@@ -109,4 +109,4 @@ proto_3g_teardown() {
        proto_kill_command "$interface"
 }
 
        proto_kill_command "$interface"
 }
 
-[ -z "NOT_INCLUDED" ] || add_protocol 3g
+[ -z "$NOT_INCLUDED" ] || add_protocol 3g
index 381bfb000075d4fdfe1d2024d3af6a1e80ee9b47..3452fa5db702c944ce985a064a545e5316ebbe0e 100644 (file)
@@ -44,8 +44,7 @@ proto_directip_setup() {
                return 1
        }
 
                return 1
        }
 
-       cardinfo=$(gcom -d "$device" -s /etc/gcom/getcardinfo.gcom)
-       [ -n $(echo "$cardinfo" | grep -q "Sierra Wireless") ] || {
+       gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | grep -q "Sierra Wireless" || {
                proto_notify_error "$interface" BAD_DEVICE
                proto_block_restart "$interface"
                return 1
                proto_notify_error "$interface" BAD_DEVICE
                proto_block_restart "$interface"
                return 1
index a96adf9bc8b2fd0094f1a01c7bf68580fba9d5cb..4960149f11f5f4389d36fe374bfeb270a23eba61 100755 (executable)
@@ -1,4 +1,4 @@
-#/bin/sh
+#!/bin/sh
 #
 # Copyright (C) 2011 OpenWrt.org
 #
 #
 # Copyright (C) 2011 OpenWrt.org
 #