diff mbox series

[OpenWrt-Devel,09/10] procd: replace backticks by $(...)

Message ID 20200510144754.10751-9-freifunk@adrianschmutzler.de
State Accepted
Delegated to: Adrian Schmutzler
Headers show
Series [OpenWrt-Devel,01/10] ltq-vdsl-app: replace backticks by $(...) | expand

Commit Message

Adrian Schmutzler May 10, 2020, 2:47 p.m. UTC
This replaces deprecated backticks by more versatile $(...) syntax.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 package/system/procd/files/procd.sh      | 4 ++--
 package/system/procd/files/reload_config | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 25a9f049cb..b8605396e9 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -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
 }
 
diff --git a/package/system/procd/files/reload_config b/package/system/procd/files/reload_config
index 8d1cdb1378..3ae0de96a3 100644
--- a/package/system/procd/files/reload_config
+++ b/package/system/procd/files/reload_config
@@ -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
 }