summary refs log tree commit diff
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2015-03-13 08:19:04 +0100
committerJuan RP <xtraeme@gmail.com>2015-03-13 08:19:04 +0100
commit45927e6d26b1fdb0f68242a0eb04f2dd0c57a3bf (patch)
tree36d055abed65ef3aa21f409acf69eaacf11aefb0
parente738582e8713aa2f0b6a9c3a4ad34c4a9d482ba2 (diff)
parent408fb336eee794141084b93b145609b1b0b682c3 (diff)
downloadrunit-void-45927e6d26b1fdb0f68242a0eb04f2dd0c57a3bf.tar.gz
runit-void-45927e6d26b1fdb0f68242a0eb04f2dd0c57a3bf.tar.xz
runit-void-45927e6d26b1fdb0f68242a0eb04f2dd0c57a3bf.zip
Merge pull request #18 from nmeum/read-hostname
Use read to retrieve the 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 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"