commit: 513021d90162ddeaeb0d308e7f27dd0a84b588db
Author: Richard Yao <ryao <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 16 00:35:06 2014 +0000
Commit: Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Sun Mar 16 00:41:33 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=513021d9
call_func_timeout() should return 1 upon failure
Signed-off-by: Richard Yao <ryao <AT> gentoo.org>
---
defaults/initrd.scripts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 611d01c..5ef5d0b 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -10,12 +10,12 @@ call_func_timeout()
( ${func} ) & pid=$!
( sleep ${timeout} && kill -HUP ${pid} ) 2>/dev/null & watcher=$!
if wait ${pid} 2>/dev/null; then
- kill -HUP $watcher 2> /dev/null
- wait $watcher 2>/dev/null
- return 1
+ kill -HUP $watcher 2> /dev/null
+ wait $watcher 2>/dev/null
+ return 0
fi
- return 0
+ return 1
}
modules_load() {