about summary refs log tree commit diff
path: root/core-services
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2015-03-10 16:21:50 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2015-03-10 16:21:50 +0100
commit408fb336eee794141084b93b145609b1b0b682c3 (patch)
treef019a21e7acd086af146d8fa5d7c4239bbb7c7a0 /core-services
parent54c677a1463ab6577ee812b99adbd8b63840db80 (diff)
downloadrunit-void-408fb336eee794141084b93b145609b1b0b682c3.tar.gz
runit-void-408fb336eee794141084b93b145609b1b0b682c3.tar.xz
runit-void-408fb336eee794141084b93b145609b1b0b682c3.zip
Use read to retrieve the hostname
Diffstat (limited to 'core-services')
-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 11ce1e6..9beff2a 100644
--- a/core-services/05-misc.sh
+++ b/core-services/05-misc.sh
@@ -10,7 +10,7 @@ ip link set up dev lo
 if [ -n "$HOSTNAME" ]; then
     echo "$HOSTNAME" > /proc/sys/kernel/hostname
 elif [ -r /etc/hostname ]; then
-    HOSTNAME=$(cat /etc/hostname)
+    read -r HOSTNAME < /etc/hostname
     echo "$HOSTNAME" > /proc/sys/kernel/hostname
 fi
 msg "Setting up hostname to '${HOSTNAME}'...\n"