From: Christian Heller Date: Sun, 7 Feb 2016 22:01:37 +0000 (+0100) Subject: postinstall script: Only grab first IP from "hostname -I". X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bprefix%7D%7D/condition?a=commitdiff_plain;h=efd2d20f9eab0149cd3208d04f1aabe24e1e3aec;p=config postinstall script: Only grab first IP from "hostname -I". --- diff --git a/jessie_postinstall.sh b/jessie_postinstall.sh index a14dcce..587f30b 100755 --- a/jessie_postinstall.sh +++ b/jessie_postinstall.sh @@ -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.