From 513021d90162ddeaeb0d308e7f27dd0a84b588db Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sat, 15 Mar 2014 20:35:06 -0400 Subject: call_func_timeout() should return 1 upon failure Signed-off-by: Richard Yao --- defaults/initrd.scripts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 611d01c8..5ef5d0bb 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() { -- cgit v1.2.3-65-gdbad