diff options
-rw-r--r-- | usr.sbin/dhcp/dhclient/scripts/dhclient-script | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/dhcp/dhclient/scripts/dhclient-script b/usr.sbin/dhcp/dhclient/scripts/dhclient-script index 5c5d1395f05..984867cd68a 100644 --- a/usr.sbin/dhcp/dhclient/scripts/dhclient-script +++ b/usr.sbin/dhcp/dhclient/scripts/dhclient-script @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: dhclient-script,v 1.12 2003/06/10 23:38:17 krw Exp $ +# $OpenBSD: dhclient-script,v 1.13 2003/06/13 12:08:43 krw Exp $ # # @@ -97,8 +97,12 @@ add_new_resolv_conf() { cat /etc/resolv.conf.tail >>/etc/resolv.conf.std fi - rm -f /etc/resolv.conf - mv /etc/resolv.conf.std /etc/resolv.conf + # In case (e.g. during OpenBSD installs) /etc/resolv.conf + # is a symbolic link, take care to preserve the link and write + # the new data in the correct location. + + cat /etc/resolv.conf.std > /etc/resolv.conf + rm -f /etc/resolv.conf.std return 0 fi |