From bcbcea89b153aed0c905201c14ea3d3e3a1ee043 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 24 Apr 2011 17:35:05 -0400 Subject: rc: exit with error count, not error sum cc199761f assumes that /etc/rc.d scripts will exit with a value of 0 or 1. Since this can't be guaranteed, clamp the return value to 0 or 1 before adding it to the exit value. Note that a lot of /etc/rc.d scripts don't properly exit with 0 or 1, so this is more of a forward looking change in the hope that these scripts are cleaned up. Signed-off-by: Tom Gundersen --- rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc b/rc index 1e64119..54dc11c 100755 --- a/rc +++ b/rc @@ -45,7 +45,7 @@ case $1 in shift for i; do [[ -x "/etc/rc.d/$i" ]] && "/etc/rc.d/$i" $action - (( ret += $? )) + (( ret += !! $? )) # clamp exit value to 0/1 done esac -- cgit v1.2.3