aboutsummaryrefslogtreecommitdiff
path: root/init.d/hostname
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/hostname')
-rwxr-xr-xinit.d/hostname8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.d/hostname b/init.d/hostname
index c5538c52..448f0b00 100755
--- a/init.d/hostname
+++ b/init.d/hostname
@@ -4,15 +4,15 @@
description="Sets the hostname of the machine."
-depend() {
+depend()
+{
need checkroot
}
-start() {
+start()
+{
hostname=${hostname-${HOSTNAME-localhost}}
ebegin "Setting hostname to ${hostname}"
hostname "${hostname}"
eend $? "Failed to set the hostname"
}
-
-# vim: set ts=4 :