grep -q 'failsafe=' /proc/cmdline && FAILSAFE=true && export FAILSAFE
if [ "$FAILSAFE" != "true" ]; then
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true
- [ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "`cat /tmp/failsafe_button`" was pressed -"
+ [ -f "/tmp/failsafe_button" ] && FAILSAFE=true && echo "- failsafe button "$(cat /tmp/failsafe_button)" was pressed -"
[ "$FAILSAFE" = "true" ] && export FAILSAFE && touch /tmp/failsafe
fi
}
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"
# 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
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