aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2014-03-15 20:35:06 -0400
committerRichard Yao <ryao@gentoo.org>2014-03-15 20:41:33 -0400
commit513021d90162ddeaeb0d308e7f27dd0a84b588db (patch)
tree9d83f03145c5d4ce0bcac8279d242b1983a1757b /defaults
parentRevert "Workaround busybox modprobe's inability to load ZFS modules" (diff)
downloadgenkernel-513021d90162ddeaeb0d308e7f27dd0a84b588db.tar.gz
genkernel-513021d90162ddeaeb0d308e7f27dd0a84b588db.tar.bz2
genkernel-513021d90162ddeaeb0d308e7f27dd0a84b588db.zip
call_func_timeout() should return 1 upon failure
Signed-off-by: Richard Yao <ryao@gentoo.org>
Diffstat (limited to 'defaults')
-rw-r--r--defaults/initrd.scripts8
1 files 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() {