diff options
author | Dave Reisner <d@falconindy.com> | 2011-04-24 17:35:05 -0400 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2011-04-30 21:10:40 +0200 |
commit | bcbcea89b153aed0c905201c14ea3d3e3a1ee043 (patch) | |
tree | ea796adc2288bd996fd2ff7b4d7f2b0ae0c1e07f | |
parent | e0153f33ea46d23da4add5409b344e3cc050c6cc (diff) |
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 <teg@jklm.no>
-rwxr-xr-x | rc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |