Roy's Projects
/
openresolv
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove vim comments and fix formatting a little.
[openresolv]
/
libc.in
diff --git
a/libc.in
b/libc.in
index 83d25191a0ff7d34a13dfc493efecc5aef101e44..0f533b1444d76555a342e47fbeb3c0204354b22b 100755
(executable)
--- a/
libc.in
+++ b/
libc.in
@@
-1,6
+1,5
@@
#!/bin/sh
#!/bin/sh
-# Copyright 2006 Gentoo Foundation
-# Copyright 2007 Roy Marples
+# Copyright 2007-2008 Roy Marples
# All rights reserved
# libc subscriber for resolvconf
# All rights reserved
# libc subscriber for resolvconf
@@
-36,8
+35,8
@@
uniqify() {
local result=
while [ -n "$1" ]; do
case " ${result} " in
local result=
while [ -n "$1" ]; do
case " ${result} " in
- *" $1 "*)
;;
- *) result="${result} $1"
;;
+ *" $1 "*);;
+ *) result="${result} $1";;
esac
shift
done
esac
shift
done
@@
-64,7
+63,7
@@
for N in ${OUR_NS}; do
NS="${NS} ${N}"
[ "${i}" = "3" ] && break
case "${N}" in
NS="${NS} ${N}"
[ "${i}" = "3" ] && break
case "${N}" in
- 127.*) LOCALH=true; break
;;
+ 127.*) LOCALH=true; break;;
esac
done
esac
done
@@
-74,7
+73,7
@@
done
# ones. This means we prefer search then domain, otherwise, we use them in
# the order given to us.
OUR_SEARCH=
# ones. This means we prefer search then domain, otherwise, we use them in
# the order given to us.
OUR_SEARCH=
-if ${LOCALH}
; then
+if ${LOCALH}; then
if [ -e "${BASE}" ]; then
OUR_SEARCH="$(sed -n -e 's/^[[:space:]]*search[[:space:]]*//p' "${BASE}")"
fi
if [ -e "${BASE}" ]; then
OUR_SEARCH="$(sed -n -e 's/^[[:space:]]*search[[:space:]]*//p' "${BASE}")"
fi
@@
-142,10
+141,13
@@
fi
(umask 022; printf "${NEWCONF}" > "${RESOLVCONF}"/run/resolv.conf)
resolvconf -s nscd restart
(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
# 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
done
-
-# vim: ts=4 :
+exit ${retval}