From: Harald Hoyer Date: Wed, 29 Oct 2014 12:51:15 +0000 (+0100) Subject: shutdown.sh: correct return code of _check_shutdown() X-Git-Tag: 041~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5cac9e14ecadc21cc5a903101135d07eb3fa60e2;p=thirdparty%2Fdracut.git shutdown.sh: correct return code of _check_shutdown() fix commit b09faad8779f5579, which reversed the return code --- diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh index 98eab1d88..c183f9dbf 100755 --- a/modules.d/99shutdown/shutdown.sh +++ b/modules.d/99shutdown/shutdown.sh @@ -84,14 +84,14 @@ fi _check_shutdown() { local __f - local __s=1 + local __s=0 for __f in $hookdir/shutdown/*.sh; do [ -e "$__f" ] || continue ( . "$__f" $1 ) if [ $? -eq 0 ]; then rm -f -- $__f else - __s=0 + __s=1 fi done return $__s @@ -99,7 +99,7 @@ _check_shutdown() { _cnt=0 while [ $_cnt -le 40 ]; do - _check_shutdown || break + _check_shutdown && break _cnt=$(($_cnt+1)) done [ $_cnt -ge 40 ] && _check_shutdown final