orion: replace backticks by $(...)
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 24 Jul 2019 22:45:49 +0000 (00:45 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 28 Sep 2019 22:46:13 +0000 (00:46 +0200)
This replaces deprecated backticks by more versatile $(...) syntax.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[decapitalized patch subject at submitter's request]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/orion/generic/base-files/etc/uci-defaults/09_hardware
target/linux/orion/image/generic.mk

index 751749d13dd4ca5cd2d883f64cc04f80d5e8f2f5..5d928b092ad70adc8a05185c6de88d44e65371be 100644 (file)
@@ -30,15 +30,15 @@ commit system
 __EOF
 
 # add mac address from U-Boot partition to lan and wan devices
-       MTD=`grep -e 'u-boot' /proc/mtd`
-       MTD=`echo ${MTD} | sed 's/[a-z]*\([0-9]*\):.*/\1/'`
+       MTD=$(grep -e 'u-boot' /proc/mtd)
+       MTD=$(echo ${MTD} | sed 's/[a-z]*\([0-9]*\):.*/\1/')
        [ -n "${MTD}" ] && {
-               MACADDR=`dd if=/dev/mtdblock${MTD} bs=1 skip=262048 count=6 2>/dev/null | hexdump -e '1/1 "%02x"'`
+               MACADDR=$(dd if=/dev/mtdblock${MTD} bs=1 skip=262048 count=6 2>/dev/null | hexdump -e '1/1 "%02x"')
                MACADDR2=$(( 0x${MACADDR} + 1))
-               MACADDR2=`printf "%012x" ${MACADDR2}`
+               MACADDR2=$(printf "%012x" ${MACADDR2})
 
-               MACADDR=`echo ${MACADDR} | sed 's/\(..\)/\1:/g' | sed 's/:$//'`
-               MACADDR2=`echo ${MACADDR2} | sed 's/\(..\)/\1:/g' | sed 's/:$//'`
+               MACADDR=$(echo ${MACADDR} | sed 's/\(..\)/\1:/g' | sed 's/:$//')
+               MACADDR2=$(echo ${MACADDR2} | sed 's/\(..\)/\1:/g' | sed 's/:$//')
 
                uci set network.eth0.macaddr=${MACADDR}
                uci set network.lan.macaddr=${MACADDR}
index 22909ac73d532d047e1790ab1253c263e1b58f95..595f8c1f79d3d06a5128c8e353ae261eb1c8effd 100644 (file)
@@ -110,7 +110,7 @@ endef
 
 define Image/Default/FileSizeCheck
  # parameters: 1 = file path, 2 = maximum size in bytes
-       [ `stat -c %s '$(1)'` -le $(2) ] || { echo '   ERROR: $(1) too big (> $(2) bytes)'; rm -f $(1); }
+       [ $(stat -c %s '$(1)') -le $(2) ] || { echo '   ERROR: $(1) too big (> $(2) bytes)'; rm -f $(1); }
 endef