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. --- rc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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
--
1.7.4.4
