aboutsummaryrefslogtreecommitdiff
path: root/contrib/isc-dhcp/client/scripts/freebsd
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/isc-dhcp/client/scripts/freebsd')
-rwxr-xr-xcontrib/isc-dhcp/client/scripts/freebsd16
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/isc-dhcp/client/scripts/freebsd b/contrib/isc-dhcp/client/scripts/freebsd
index f9d61b59cf3d..824efae1e68a 100755
--- a/contrib/isc-dhcp/client/scripts/freebsd
+++ b/contrib/isc-dhcp/client/scripts/freebsd
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: freebsd,v 1.13.2.4 2002/06/09 22:37:55 murray Exp $
+# $Id: freebsd,v 1.13.2.5 2003/04/27 19:44:01 dhankins Exp $
#
# $FreeBSD$
@@ -13,13 +13,19 @@ fi
make_resolv_conf() {
if [ x"$new_domain_name_servers" != x ]; then
if [ "x$new_domain_name" != x ]; then
- echo search $new_domain_name >/etc/resolv.conf
+ ( echo search $new_domain_name >/etc/resolv.conf )
+ exit_status=$?
else
rm /etc/resolv.conf
+ exit_status=$?
+ fi
+ if [ $exit_status -ne 0 ]; then
+ $LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status"
+ else
+ for nameserver in $new_domain_name_servers; do
+ ( echo nameserver $nameserver >>/etc/resolv.conf )
+ done
fi
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
fi
}