From 169b0f739fbba866296fc9d30bc463fb522fef69 Mon Sep 17 00:00:00 2001 From: Christopher Brannon Date: Wed, 11 Nov 2015 12:14:37 -0800 Subject: Don't output newline to /proc file when setting hostname. This breaks in certain combinations of echo command and standard library, notably musl and bash builtin echo, or coreutils echo + musl. --- core-services/05-misc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-services/05-misc.sh b/core-services/05-misc.sh index 8f5c6c5..743dcdb 100644 --- a/core-services/05-misc.sh +++ b/core-services/05-misc.sh @@ -10,7 +10,7 @@ ip link set up dev lo [ -r /etc/hostname ] && read -r HOSTNAME < /etc/hostname if [ -n "$HOSTNAME" ]; then msg "Setting up hostname to '${HOSTNAME}'..." - echo "$HOSTNAME" > /proc/sys/kernel/hostname + printf "%s" "$HOSTNAME" > /proc/sys/kernel/hostname else msg_warn "Didn't setup a hostname!" fi -- cgit 1.4.1