Moved from ifconfig to ip

このコミットが含まれているのは:
Sebastian Lohff 2012-03-18 01:35:12 +01:00
コミット 48318d9132
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -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