diff options
Diffstat (limited to 'init.d/hostname')
-rwxr-xr-x | init.d/hostname | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/init.d/hostname b/init.d/hostname index 3f6b0569..688c0421 100755 --- a/init.d/hostname +++ b/init.d/hostname @@ -31,13 +31,9 @@ depend() { } start() { - if [ -f /etc/hostname ] ; then - ewarn "You should stop using /etc/hostname and use /etc/conf.d/hostname" - HOSTNAME=$(cat /etc/hostname) - fi - - ebegin "Setting hostname to ${HOSTNAME}" - hostname "${HOSTNAME}" + hostname=${hostname-${HOSTNAME-localhost}} + ebegin "Setting hostname to ${hostname}" + hostname "${hostname}" eend $? "Failed to set the hostname" } |