mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
Support the setting of hostname via DHCP.
Submitted by: myself & Ted Lemon <mellon@isc.org>
This commit is contained in:
parent
711103c1cc
commit
0e8d72b9e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49401
|
@ -72,6 +72,13 @@ fi
|
|||
|
||||
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
|
||||
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
|
||||
current_hostname=`/bin/hostname`
|
||||
if [ x$current_hostname = x ] || \
|
||||
[ x$current_hostname = x$old_host_name ]; then
|
||||
if [ x$new_host_name != x$old_host_name ]; then
|
||||
hostname $new_host_name
|
||||
fi
|
||||
fi
|
||||
if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
|
||||
[ x$alias_ip_address != x$old_ip_address ]; then
|
||||
ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
|
||||
|
|
Loading…
Reference in a new issue