procd: replace backticks by $(...)
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 10 May 2020 14:47:53 +0000 (16:47 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Wed, 13 May 2020 17:01:23 +0000 (19:01 +0200)
This replaces deprecated backticks by more versatile $(...) syntax.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
package/system/procd/files/procd.sh
package/system/procd/files/reload_config

index 25a9f049cb412ff3a1744e7e8a057408d4665dc0..b8605396e9b006696357bbc25351f00e1850bc33 100644 (file)
@@ -528,10 +528,10 @@ uci_validate_section()
        local _result
        local _error
        shift; shift; shift
-       _result=`/sbin/validate_data "$_package" "$_type" "$_name" "$@" 2> /dev/null`
+       _result=$(/sbin/validate_data "$_package" "$_type" "$_name" "$@" 2> /dev/null)
        _error=$?
        eval "$_result"
-       [ "$_error" = "0" ] || `/sbin/validate_data "$_package" "$_type" "$_name" "$@" 1> /dev/null`
+       [ "$_error" = "0" ] || $(/sbin/validate_data "$_package" "$_type" "$_name" "$@" 1> /dev/null)
        return $_error
 }
 
index 8d1cdb13789062515617724b4a0887c56c8b77fe..3ae0de96a3f9f59697eff6e30bac2ebeb06ad15b 100644 (file)
@@ -7,7 +7,7 @@ for config in /etc/config/*; do
 done
 MD5FILE=/var/run/config.md5
 [ -f $MD5FILE ] && {
-       for c in `md5sum -c $MD5FILE 2>/dev/null| grep FAILED | cut -d: -f1`; do
+       for c in $(md5sum -c $MD5FILE 2>/dev/null| grep FAILED | cut -d: -f1); do
                ubus call service event "{ \"type\": \"config.change\", \"data\": { \"package\": \"$(basename $c)\" }}"
        done
 }