From a511a48d77b1dcb8a3fb0dd1abddb750a152869b Mon Sep 17 00:00:00 2001 From: Nuno Silva Date: Sat, 10 Jun 2017 03:12:49 +0100 Subject: init.d/hostname: fix default parameter syntax The syntax for expanding a variable with a default value is ${parameter:-word} not ${parameter-word} although the latter still works for a reason I could not explain. This fixes #143. --- init.d/hostname.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.d') diff --git a/init.d/hostname.in b/init.d/hostname.in index c144a710..d7913bed 100644 --- a/init.d/hostname.in +++ b/init.d/hostname.in @@ -26,7 +26,7 @@ start() else # HOSTNAME variable used to be defined in caps in conf.d/hostname. # It is also a magic variable in bash. - h=${hostname-${HOSTNAME}} # checkbashisms: false positive + h=${hostname:-${HOSTNAME}} # checkbashisms: false positive (HOSTNAME var) fi if [ -z "$h" ]; then einfo "Using default system hostname" -- cgit v1.2.3