- Use "/bin/hostname" explicitly instead of "hostname".

Approved by:	tobez
MFC after:	1 week
This commit is contained in:
krion 2004-04-02 12:18:40 +00:00
parent 8ca527be93
commit 8997a8f449
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ hostname_start()
if [ `$SYSCTL_N security.jail.set_hostname_allowed` -eq 0 ]; then
return
fi
elif [ -n "`hostname -s`" ]; then
elif [ -n "`/bin/hostname -s`" ]; then
return
else
# If we're not in a jail and rc.conf doesn't specify a
@ -59,7 +59,7 @@ hostname_start()
fi
fi
hostname ${hostname}
/bin/hostname ${hostname}
echo "Setting hostname: `hostname`."
}

View File

@ -26,13 +26,13 @@ network_start()
fi
if [ -n "$hostname" ]; then
echo "Hostname: $hostname"
hostname $hostname
/bin/hostname $hostname
else
# Don't warn about it if we're going to run
# DHCP later, as we will probably get the
# hostname at that time.
#
if ! checkyesno dhclient && [ -z "`hostname`" ]; then
if ! checkyesno dhclient && [ -z "`/bin/hostname`" ]; then
warn "\$hostname not set."
fi
fi