From 91e28ab775e2bcfb343ba2e2c8b7db0289e11f70 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 6 Nov 2012 23:11:58 +0000 Subject: [PATCH] init.d/hostname: Document checkbashism false positive. Signed-off-by: Robin H. Johnson --- init.d/hostname.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.d/hostname.in b/init.d/hostname.in index 2b0ec810..5d8ce28d 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"