summaryrefslogtreecommitdiff
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 c5538c5..448f0b0 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 :