From 20940138ac41e3eca54afefc34f65e40834be3ea Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 14 Oct 2014 12:21:11 +0000 Subject: 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 SVN-Revision: 42911 --- target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration') 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 -- cgit v1.1