]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
shutdown.sh: correct return code of _check_shutdown()
authorHarald Hoyer <harald@redhat.com>
Wed, 29 Oct 2014 12:51:15 +0000 (13:51 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 29 Oct 2014 12:56:55 +0000 (13:56 +0100)
fix commit b09faad8779f5579, which reversed the return code

modules.d/99shutdown/shutdown.sh

index 98eab1d88cf156837509e83c6140f7768d99ad28..c183f9dbf98c4769a15c3f5e023d2c4f4647ccb1 100755 (executable)
@@ -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