From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-677632-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 857F61391DB
	for <garchives@archives.gentoo.org>; Sun, 16 Mar 2014 00:41:54 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 278C1E0AD3;
	Sun, 16 Mar 2014 00:41:50 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id ABC83E0AD3
	for <gentoo-commits@lists.gentoo.org>; Sun, 16 Mar 2014 00:41:49 +0000 (UTC)
Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id D8C1633FA68
	for <gentoo-commits@lists.gentoo.org>; Sun, 16 Mar 2014 00:41:48 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by spoonbill.gentoo.org (Postfix) with ESMTP id A171A18875
	for <gentoo-commits@lists.gentoo.org>; Sun, 16 Mar 2014 00:41:47 +0000 (UTC)
From: "Richard Yao" <ryao@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Richard Yao" <ryao@gentoo.org>
Message-ID: <1394930493.513021d90162ddeaeb0d308e7f27dd0a84b588db.ryao@gentoo>
Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/
X-VCS-Repository: proj/genkernel
X-VCS-Files: defaults/initrd.scripts
X-VCS-Directories: defaults/
X-VCS-Committer: ryao
X-VCS-Committer-Name: Richard Yao
X-VCS-Revision: 513021d90162ddeaeb0d308e7f27dd0a84b588db
X-VCS-Branch: master
Date: Sun, 16 Mar 2014 00:41:47 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 1b39bf83-cdc4-4e95-8d06-f32e26516ed3
X-Archives-Hash: ad7df9156242f2696c50fea6aaf313b9

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() {