summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient-script
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-03 20:16:33 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-03 20:16:33 +0000
commit0d94a9cb8b182aa17dfb05546d6516f916b75fbb (patch)
tree56ca1072e33d4e7b6fa177105e989e5a0617527f /sbin/dhclient-script
parent38d65554505b0dc24a68f6c0985341600635b9f3 (diff)
downloadpfsense-0d94a9cb8b182aa17dfb05546d6516f916b75fbb.zip
pfsense-0d94a9cb8b182aa17dfb05546d6516f916b75fbb.tar.gz
Use /var/etc/ for temporary staging of resolv.conf
Diffstat (limited to 'sbin/dhclient-script')
-rwxr-xr-xsbin/dhclient-script20
1 files changed, 10 insertions, 10 deletions
diff --git a/sbin/dhclient-script b/sbin/dhclient-script
index 877f74d..6e83744 100755
--- a/sbin/dhclient-script
+++ b/sbin/dhclient-script
@@ -159,24 +159,24 @@ add_new_resolv_conf() {
fi
if [ -f /var/etc/resolv.conf.std ]; then
- if [ -f /etc/resolv.conf.tail ]; then
- cat /etc/resolv.conf.tail >>/var/etc/resolv.conf.std
+ if [ -f /var/etc/resolv.conf.tail ]; then
+ cat /var/etc/resolv.conf.tail >>/var/etc/resolv.conf.std
fi
- # In case (e.g. during OpenBSD installs) /etc/resolv.conf
+ # In case (e.g. during OpenBSD installs) /var/etc/resolv.conf
# is a symbolic link, take care to preserve the link and write
# the new data in the correct location.
- if [ -f /etc/resolv.conf ]; then
- cat /etc/resolv.conf > /etc/resolv.conf.save
+ if [ -f /var/etc/resolv.conf ]; then
+ cat /var/etc/resolv.conf > /var/etc/resolv.conf.save
fi
cat /var/etc/resolv.conf.std > /var/etc/nameservers.conf
- cat /var/etc/resolv.conf.std > /etc/resolv.conf
+ cat /var/etc/resolv.conf.std > /var/etc/resolv.conf
rm -f /var/etc/resolv.conf.std
# Try to ensure correct ownership and permissions.
- chown -RL root:wheel /etc/resolv.conf
- chmod -RL 644 /etc/resolv.conf
+ chown -RL root:wheel /var/etc/resolv.conf
+ chmod -RL 644 /var/etc/resolv.conf
return 0
fi
@@ -263,8 +263,8 @@ EXPIRE|FAIL)
fi
# XXX Why add alias we just deleted above?
add_new_alias
- if [ -f /etc/resolv.conf.save ]; then
- cat /etc/resolv.conf.save > /etc/resolv.conf
+ if [ -f /var/etc/resolv.conf.save ]; then
+ cat /var/etc/resolv.conf.save > /var/etc/resolv.conf
fi
;;
OpenPOWER on IntegriCloud