orion: replace backticks by $(...)

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>
master
Adrian Schmutzler 2019-07-25 00:45:49 +02:00 committed by Christian Lamparter
parent 81c52edf2b
commit a421a12f9c
2 changed files with 7 additions and 7 deletions

View File

@ -30,15 +30,15 @@ commit system
__EOF __EOF
# add mac address from U-Boot partition to lan and wan devices # add mac address from U-Boot partition to lan and wan devices
MTD=`grep -e 'u-boot' /proc/mtd` MTD=$(grep -e 'u-boot' /proc/mtd)
MTD=`echo ${MTD} | sed 's/[a-z]*\([0-9]*\):.*/\1/'` MTD=$(echo ${MTD} | sed 's/[a-z]*\([0-9]*\):.*/\1/')
[ -n "${MTD}" ] && { [ -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=$(( 0x${MACADDR} + 1))
MACADDR2=`printf "%012x" ${MACADDR2}` MACADDR2=$(printf "%012x" ${MACADDR2})
MACADDR=`echo ${MACADDR} | sed 's/\(..\)/\1:/g' | sed 's/:$//'` MACADDR=$(echo ${MACADDR} | sed 's/\(..\)/\1:/g' | sed 's/:$//')
MACADDR2=`echo ${MACADDR2} | sed 's/\(..\)/\1:/g' | sed 's/:$//'` MACADDR2=$(echo ${MACADDR2} | sed 's/\(..\)/\1:/g' | sed 's/:$//')
uci set network.eth0.macaddr=${MACADDR} uci set network.eth0.macaddr=${MACADDR}
uci set network.lan.macaddr=${MACADDR} uci set network.lan.macaddr=${MACADDR}

View File

@ -110,7 +110,7 @@ endef
define Image/Default/FileSizeCheck define Image/Default/FileSizeCheck
# parameters: 1 = file path, 2 = maximum size in bytes # 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 endef