From 8997a8f44937fc81af3398ea85e964a93e4aacb3 Mon Sep 17 00:00:00 2001 From: krion Date: Fri, 2 Apr 2004 12:18:40 +0000 Subject: - Use "/bin/hostname" explicitly instead of "hostname". Approved by: tobez MFC after: 1 week --- etc/rc.d/hostname | 4 ++-- etc/rc.d/network | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'etc') diff --git a/etc/rc.d/hostname b/etc/rc.d/hostname index 65b6ba2..634add2 100644 --- a/etc/rc.d/hostname +++ b/etc/rc.d/hostname @@ -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`." } diff --git a/etc/rc.d/network b/etc/rc.d/network index 7fcb5b2..ce3336b 100755 --- a/etc/rc.d/network +++ b/etc/rc.d/network @@ -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 -- cgit v1.1