home · contact · privacy
postinstall script: Only grab first IP from "hostname -I".
authorChristian Heller <c.heller@plomlompom.de>
Sun, 7 Feb 2016 22:01:37 +0000 (23:01 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 7 Feb 2016 22:01:37 +0000 (23:01 +0100)
jessie_postinstall.sh

index a14dcce8b6623811f273249e158c658e1dcf8b3f..587f30b35dbc3214b34b7d411a7eec49de051211 100755 (executable)
@@ -57,7 +57,7 @@ echo $hostname > /etc/hostname
 hostname $hostname
 if [ "$1" = "server" ]; then
     echo '127.0.0.1 localhost' > /etc/hosts
-    ip=`hostname -I`
+    ip=`hostname -I | cut -d " " -f 1`
     echo "$ip $2 $hostname" >> /etc/hosts
 
     # Call dhclient on startup.