about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEnno Boland <g@s01.de>2015-11-11 21:31:28 +0100
committerEnno Boland <g@s01.de>2015-11-11 21:31:28 +0100
commit90043f9f1808c5dc07bc52431e5300d542cf12f6 (patch)
tree69c266c884e4d4b75e2a65ed0e867994bdfba95d
parent39ae8ddc3c9487369a16016e558800d4dea11ce1 (diff)
parent169b0f739fbba866296fc9d30bc463fb522fef69 (diff)
downloadrunit-void-90043f9f1808c5dc07bc52431e5300d542cf12f6.tar.gz
runit-void-90043f9f1808c5dc07bc52431e5300d542cf12f6.tar.xz
runit-void-90043f9f1808c5dc07bc52431e5300d542cf12f6.zip
Merge pull request #43 from CMB/hostname 20151111
Don't output newline to /proc file when setting hostname.
-rw-r--r--core-services/05-misc.sh2
1 files changed, 1 insertions, 1 deletions
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