diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-05-10 16:47:46 +0200 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-07-11 12:52:01 +0200 |
commit | d7d6e055e9d9d9554f59e919f37e0b6cd46b12a1 (patch) | |
tree | e2495a77aa22a3f89014293181c101f93dc14bc0 /package/base-files/files/sbin | |
parent | 5115cb0501674bd613d39edab41957578565ff9e (diff) | |
download | upstream-d7d6e055e9d9d9554f59e919f37e0b6cd46b12a1.tar.gz upstream-d7d6e055e9d9d9554f59e919f37e0b6cd46b12a1.tar.bz2 upstream-d7d6e055e9d9d9554f59e919f37e0b6cd46b12a1.zip |
base-files: replace backticks by $(...)
This replaces deprecated backticks by more versatile $(...) syntax.
This does not touch lib/upgrade/nand.sh, as there replacement is
not trivial.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'package/base-files/files/sbin')
-rwxr-xr-x | package/base-files/files/sbin/pkg_check | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/package/base-files/files/sbin/pkg_check b/package/base-files/files/sbin/pkg_check index 9968c9b78e..775e401b26 100755 --- a/package/base-files/files/sbin/pkg_check +++ b/package/base-files/files/sbin/pkg_check @@ -72,14 +72,14 @@ while [ "$1" ]; do fi [ $QUIET = yes ] || echo " * Checking package $1:" ERR="" - CHECK="`sha256sum -c /usr/lib/opkg/info/$1.files-sha256sum 2> /dev/null`" + CHECK="$(sha256sum -c /usr/lib/opkg/info/$1.files-sha256sum 2> /dev/null)" # Are the changed files config files? - if [ $? -ne 0 ] && [ "`cat "/usr/lib/opkg/info/$1.files-sha256sum"`" ]; then - NEWCHECK="`echo "$CHECK" | grep '^.*: OK$'`" - for i in `echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'`; do - if [ "`grep "^$i\$" "/usr/lib/opkg/info/$1.conffiles" 2> /dev/null`" ] || \ - [ "`echo "$i" | grep "^/etc/uci-defaults/"`" ]; then + if [ $? -ne 0 ] && [ "$(cat "/usr/lib/opkg/info/$1.files-sha256sum")" ]; then + NEWCHECK="$(echo "$CHECK" | grep '^.*: OK$')" + for i in $(echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'); do + if [ "$(grep "^$i\$" "/usr/lib/opkg/info/$1.conffiles" 2> /dev/null)" ] || \ + [ "$(echo "$i" | grep "^/etc/uci-defaults/")" ]; then NEWCHECK="${NEWCHECK}${NL}${i}: CONFIGURED" else NEWCHECK="${NEWCHECK}${NL}${i}: FAILED" @@ -91,7 +91,7 @@ while [ "$1" ]; do # Do we have changed files or not? if [ -z "$ERR" ]; then - [ $QUIET = yes ] || [ -z "`cat "/usr/lib/opkg/info/$1.files-sha256sum"`" ] || echo "$CHECK" | sed 's|^| - |' + [ $QUIET = yes ] || [ -z "$(cat "/usr/lib/opkg/info/$1.files-sha256sum")" ] || echo "$CHECK" | sed 's|^| - |' [ $QUIET = yes ] || echo " * Package $1 is ok" [ $QUIET = yes ] || echo else @@ -107,7 +107,7 @@ while [ "$1" ]; do echo "Exiting on first change found!" exit 1 fi - for i in `echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'`; do + for i in $(echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'); do SUMMARY="${SUMMARY}${NL} - $1: $i" done echo |