[LEDE-DEV] [PATCH] ct-bugcheck: fix globbing, word splitting and change formatting
Jan-Tarek Butt
tarek at ring0.de
Fri Oct 14 08:58:08 PDT 2016
Double quote to prevent globbing and word splitting.
Use short syntax to enhance reading quallity.
Signed-off-by: Jan-Tarek Butt <tarek at ring0.de>
---
package/utils/ct-bugcheck/src/bugchecker.sh | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/package/utils/ct-bugcheck/src/bugchecker.sh b/package/utils/ct-bugcheck/src/bugchecker.sh
index be305af..eb221db 100755
--- a/package/utils/ct-bugcheck/src/bugchecker.sh
+++ b/package/utils/ct-bugcheck/src/bugchecker.sh
@@ -12,18 +12,10 @@ DO_BUGCHECK=0
# DO_BUGCHECK=1
# export DO_BUGCHECK
-if [ -f /etc/config/bugcheck ]
- then
- . /etc/config/bugcheck
-fi
+[ -f /etc/config/bugcheck ] && . /etc/config/bugcheck
+[ "$DO_BUGCHECK" -eq "0" ] && exit 0
-if [ $DO_BUGCHECK == 0 ]
-then
- exit 0
-fi
-
-while true
- do
+while true; do
$CHECKER
sleep $SLEEPFOR
done
--
2.10.0
More information about the Lede-dev
mailing list