#!/bin/sh
-# Copyright 2006 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
local result=
while [ -n "$1" ]; do
case " ${result} " in
- *" $1 "*) ;;
- *) result="${result} $1" ;;
+ *" $1 "*);;
+ *) result="${result} $1";;
esac
shift
done
NS="${NS} ${N}"
[ "${i}" = "3" ] && break
case "${N}" in
- 127.*) LOCALH=true; break ;;
+ 127.*) LOCALH=true; break;;
esac
done
# 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
(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}