Don't nag about unset $hostname if DHCP is in use.
Pointed out by: ceri
This commit is contained in:
parent
71e8866707
commit
01b777f4cb
@ -31,6 +31,7 @@
|
||||
# BEFORE: netif
|
||||
|
||||
. /etc/rc.subr
|
||||
. /etc/network.subr
|
||||
|
||||
name="hostname"
|
||||
start_cmd="hostname_start"
|
||||
@ -61,7 +62,11 @@ hostname_start()
|
||||
# Have we got a hostname yet?
|
||||
#
|
||||
if [ -z "${hostname}" ]; then
|
||||
# Null hostname is probably OK if DHCP is in use.
|
||||
#
|
||||
if [ -z "`list_net_interfaces dhcp`" ]; then
|
||||
warn "\$hostname is not set -- see ${rcvar_manpage}."
|
||||
fi
|
||||
return
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user