From e459aa3a8cc1a0f36bcd1fa4cbf1e71905d9689e Mon Sep 17 00:00:00 2001 From: j Date: Tue, 7 Nov 2017 18:12:47 +0100 Subject: [PATCH] use ip --- vm/pandora_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/pandora_install.sh b/vm/pandora_install.sh index 4e3977b8..49285a54 100755 --- a/vm/pandora_install.sh +++ b/vm/pandora_install.sh @@ -210,7 +210,7 @@ echo if [ -n "\$HOST" ]; then echo " http://\$HOST/" fi -for ip in \$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print \$1 }'); do +for ip in \$(ip -4 a | grep inet | grep -v peer | grep -v '127.0.0.1' | cut -f1 -d/ | sed s/inet//g | xargs); do echo " http://\$ip/" done echo