[LEDE-DEV] [PATCH] ct-bugcheck: fix globbing, word splitting and change formatting
Ben Greear
greearb at candelatech.com
Fri Oct 14 09:03:29 PDT 2016
On 10/14/2016 08:58 AM, Jan-Tarek Butt wrote:
> Double quote to prevent globbing and word splitting.
> Use short syntax to enhance reading quallity.
I disagree that the short syntax helps reading quality,
but if others like it then I guess that change is fine with me.
Thanks,
Ben
>
> 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
>
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
More information about the Lede-dev
mailing list