summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.d/hostname.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.d/hostname.in b/init.d/hostname.in
index 2b0ec81..5d8ce28 100644
--- a/init.d/hostname.in
+++ b/init.d/hostname.in
@@ -10,7 +10,9 @@ depend() {
start()
{
- hostname=${hostname-${HOSTNAME-localhost}}
+ # HOSTNAME variable used to be defined in caps in conf.d/hostname.
+ # It is also a magic variable in bash.
+ hostname=${hostname-${HOSTNAME-localhost}} # checkbashisms: false positive
ebegin "Setting hostname to $hostname"
hostname "$hostname"
eend $? "Failed to set the hostname"