summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/base-files/etc
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-10-14 12:21:11 +0000
committerJohn Crispin <john@openwrt.org>2014-10-14 12:21:11 +0000
commit20940138ac41e3eca54afefc34f65e40834be3ea (patch)
tree3c34846e48daad4595ab2ab2c00f1068022ee62f /target/linux/ar71xx/base-files/etc
parent8267c0e2ac371fe0f93ba34f745976acf358a253 (diff)
downloadmtk-20170518-20940138ac41e3eca54afefc34f65e40834be3ea.zip
mtk-20170518-20940138ac41e3eca54afefc34f65e40834be3ea.tar.gz
mtk-20170518-20940138ac41e3eca54afefc34f65e40834be3ea.tar.bz2
scripts: fix wrong usage of '==' operator
[base-files] shell-scripting: fix wrong usage of '==' operator normally the '==' is used for invoking a regex parser and is a bashism. all of the fixes just want to compare a string. the used busybox-ash will silently "ignore" this mistake, but make it portable/clean at least. this patch does not change the behavior/logic of the scripts. Signed-off-by: Bastian Bittorf <bittorf@bluebottle.com> SVN-Revision: 42911
Diffstat (limited to 'target/linux/ar71xx/base-files/etc')
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration2
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration4
2 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
index 31ce548..d9aa519 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration
@@ -34,7 +34,7 @@ migrate_switch_name() {
config_foreach do_change_switch_name switch name $oldname $newname
config_foreach do_change_switch_name switch_vlan device $oldname $newname
- [ "$SWITCH_NAME_CHANGED" == "1" ] && {
+ [ "$SWITCH_NAME_CHANGED" = "1" ] && {
logger -t migrate-switchX "Switch names updated, saving network configuration"
uci commit network
}
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration b/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
index 0fc632c..0df94a0 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
@@ -26,7 +26,7 @@ do_led_update_sysfs()
new_sysfs=$(echo ${sysfs} | sed "s/${old}/${new}/")
- [ "${new_sysfs}" == "${sysfs}" ] && continue
+ [ "$new_sysfs" = "$sysfs" ] && continue
uci set system.${cfg}.sysfs="${new_sysfs}"
LED_OPTIONS_CHANGED=1
@@ -80,6 +80,6 @@ wnr612-v2)
;;
esac
-[ "$LED_OPTIONS_CHANGED" == "1" ] && uci commit system
+[ "$LED_OPTIONS_CHANGED" = "1" ] && uci commit system
exit 0