dracut/0007-shutdown.sh-correct-return-code-of-_check_shutdown.patch
Harald Hoyer eeb1c23670 dracut-040-29.git20141204
- git snapshot
2014-12-04 12:31:45 +01:00

41 lines
1.1 KiB
Diff

From 5cac9e14ecadc21cc5a903101135d07eb3fa60e2 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 29 Oct 2014 13:51:15 +0100
Subject: [PATCH] shutdown.sh: correct return code of _check_shutdown()
fix commit b09faad8779f5579, which reversed the return code
---
modules.d/99shutdown/shutdown.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules.d/99shutdown/shutdown.sh b/modules.d/99shutdown/shutdown.sh
index 98eab1d..c183f9d 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