From 48318d91329c11e86fac2e617157126ecd79f720 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Sun, 18 Mar 2012 01:35:12 +0100 Subject: [PATCH] Moved from ifconfig to ip --- servefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servefile b/servefile index 757a013..a689759 100755 --- a/servefile +++ b/servefile @@ -111,7 +111,7 @@ def main(): server.address_family = 10 # print urls with local network adresses print "Some addresses this file will be available under:" - ips = commands.getoutput(r"/sbin/ifconfig |grep 'inet6\?'|grep -v 127.0.0.1|grep -v ' fe80'|grep -v ::1|sed -n 's/.*inet6\?[a-zA-Z: -]\+\([0-9a-fA-F.:]*\).*/\1/p'") + ips = commands.getoutput(r"/bin/ip addr|sed -n -e 's/.*inet6\? \([0-9.a-fA-F:]\+\)\/.*/\1/ p'|grep -v '^fe80\|^127.0.0.1\|^::1'") for ip in ips.split("\n"): if ip.find(":") >= 0: # ipv6