mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Add REQUIRE netif to make ordering more deterministic, and to make sure
we have a fighting chance of having useful stuff from DHCP. Tighten up the code a little, and fix whitespace issues.
This commit is contained in:
parent
f3ec953c8d
commit
36617e509a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170198
@ -28,6 +28,7 @@
|
||||
#
|
||||
|
||||
# PROVIDE: resolv
|
||||
# REQUIRE: netif
|
||||
# KEYWORD: nojail
|
||||
|
||||
. /etc/rc.subr
|
||||
@ -41,15 +42,15 @@ load_rc_config $name
|
||||
#
|
||||
if [ ! -e /etc/resolv.conf -a \
|
||||
-n "`/bin/kenv dhcp.domain-name-servers 2> /dev/null`" ]; then
|
||||
/bin/cat /dev/null > /etc/resolv.conf
|
||||
> /etc/resolv.conf
|
||||
|
||||
if [ -n "`/bin/kenv dhcp.domain-name 2> /dev/null`" ]; then
|
||||
echo domain `/bin/kenv dhcp.domain-name` > /etc/resolv.conf
|
||||
fi
|
||||
|
||||
set -- `/bin/kenv dhcp.domain-name-servers`
|
||||
for ns in `IFS=','; echo $*`; do
|
||||
echo nameserver $ns >> /etc/resolv.conf;
|
||||
done
|
||||
set -- `/bin/kenv dhcp.domain-name-servers`
|
||||
for ns in `IFS=','; echo $*`; do
|
||||
echo nameserver $ns >> /etc/resolv.conf;
|
||||
done
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user