Fix return codes, Gentoo #209369.
[openresolv] / libc.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}