base-files: remove some bashisms
authorSven Roederer <devel-sven@geroedel.de>
Wed, 25 Dec 2019 17:39:00 +0000 (18:39 +0100)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 26 Jan 2020 20:51:24 +0000 (21:51 +0100)
"[[" is a bash extension for test. As the ash-implementation is
not fully compatible we drop its usage.
Also change to "=" for simple test, which is sufficient. (see d6ac8ca76c04ed)

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
[split patch, removed shebang]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
package/base-files/files/lib/functions/caldata.sh

index 1ff69ce1aedddd67e1f5003a40c3979d340e629f..3bdb1e4dd5a5ae42b29d4f866ae99891e4511155 100644 (file)
@@ -69,7 +69,7 @@ caldata_valid() {
        local expected="$1"
 
        magic=$(hexdump -v -n 2 -e '1/1 "%02x"' /lib/firmware/$FIRMWARE)
-       [[ "$magic" == "$expected" ]]
+       [ "$magic" = "$expected" ]
        return $?
 }