Fix return codes, Gentoo #209369.
authorRoy Marples <roy@marples.name>
Fri, 8 Feb 2008 18:22:30 +0000 (18:22 +0000)
committerRoy Marples <roy@marples.name>
Fri, 8 Feb 2008 18:22:30 +0000 (18:22 +0000)
libc.in
resolvconf.in

diff --git a/libc.in b/libc.in
index 5ae02f4ac76f1223941fccd48c5fbdf92adeec31..e1e9014f909cc817df71ca7f7fa8182306a798f3 100755 (executable)
--- a/libc.in
+++ b/libc.in
@@ -141,10 +141,13 @@ fi
 (umask 022; printf "${NEWCONF}" > "${RESOLVCONF}"/run/resolv.conf)
 
 resolvconf -s nscd restart
+retval=$?
 
 # Notify users of the resolver
 for x in "${REVOLVCONF}"/update-libc.d/*; do
-       [ -e "${x}" ] && "${x}" "$@"
+       if [ -e "${x}" ]; then
+               "${x}" "$@"
+               retval=$((${retval} + $?))
+       fi
 done
-
-# vim: ts=4 :
+exit ${retval}
index 06f460fa7eaf7cf5d9712828dcec91aa5051718c..e59cdbe7525c5877d2c72cca47e2c511ab2016b4 100755 (executable)
@@ -113,7 +113,7 @@ if [ "x${CMD}" = "x-s" ]; then
                        false
                fi
                # Service not running, so don't restart
-               [ $? != 0 ] && exit 1
+               [ $? != 0 ] && exit 0
        fi      
        if [ -x /sbin/service ]; then
                service "${SERVICE}" "${ACTION}" "$@"