| Summary: | /sbin/dhclient-script ignores resolv.conf hooks | ||
|---|---|---|---|
| Product: | Base System | Reporter: | barry <barry> |
| Component: | bin | Assignee: | David E. O'Brien <obrien> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.3-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
I ran into the same thing. Fixed by:
--- /sbin/dhclient-script Mon Nov 22 14:52:11 1999
+++ dhclient-script Thu Nov 25 14:05:49 1999
@@ -129,10 +129,7 @@
ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg
route add $alias_ip_address 127.0.0.1
fi
- echo search $new_domain_name >/etc/resolv.conf
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ make_resolv_conf
exit_with_hooks 0
fi
@@ -190,14 +187,7 @@
route add $0 $1
shift; shift
done
- echo search $new_domain_name >/etc/resolv.conf.std
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf.std
- done
- if [ -f /etc/resolv.conf ]; then
- rm -f /etc/resolv.conf
- fi
- mv /etc/resolv.conf.std /etc/resolv.conf
+ make_resolv_conf
exit_with_hooks 0
fi
fi
Mikko Tyo"la"ja"rvi_____________________________________mikko@rsasecurity.com
RSA Security
Hi, The dhclient-script replacement submitted in PR bin/15342 fixes that problem. Patrick. -- www.mindstep.com Responsible Changed From-To: freebsd-bugs->obrien all the other DHCP ones are assigned to me. State Changed From-To: open->closed A change simular to this was committed, but I forgot to close the PR. |
/sbin/dhclient-script ignores the make_resolv_conf hooks during processing. Here is the first instance from /sbin/dhclient-script: echo search $new_domain_name >/etc/resolv.conf for nameserver in $new_domain_name_servers; do echo nameserver $nameserver >>/etc/resolv.conf done And here is the second: echo search $new_domain_name >/etc/resolv.conf.std for nameserver in $new_domain_name_servers; do echo nameserver $nameserver >>/etc/resolv.conf.std done if [ -f /etc/resolv.conf ]; then rm -f /etc/resolv.conf fi mv /etc/resolv.conf.std /etc/resolv.conf How-To-Repeat: Run dhclient and see /etc/resolv.conf get overwritten even though there is a make_resolv_conf hook defined