diff --git a/Python/etc/network/interfaces b/Python/etc/network/interfaces index ee87e95..e03656d 100644 --- a/Python/etc/network/interfaces +++ b/Python/etc/network/interfaces @@ -49,10 +49,7 @@ iface %(interface)s inet static print " ", line print - print """iface %(interface)s inet6 static - address %(ip6)s - netmask 64 -""" % { 'interface': interface, 'ip6': admip6(interface) } + adm6(interface) elif mode == "radin": print """auto %(interface)s @@ -111,7 +108,7 @@ iface %(interface)s inet manual iface %(interface)s inet manual up ip l set %(interface)s up down ip l set %(interface)s down""" % { 'interface': interface } - + else: raise NotImplementedError, "Mode de réseau inconnu : %s" % mode @@ -131,14 +128,21 @@ def pubip6(If): def admip6(If): return "2a01:240:fe3d:c804:" + If_Mac[If] -def pub6(interface): +def pub6(interface, mode = 's'): + print """iface %(interface)s inet6 static + address %(ip6)s + netmask 64""" % { 'interface': interface, 'ip6': pubip6(interface) } + if mode == 's': + print """gateway fe80::219:bbff:fe31:3b80 +""" + print "\n" + +def adm6(interface): print """iface %(interface)s inet6 static address %(ip6)s netmask 64 - gateway fe80::219:bbff:fe31:3b80 -""" % { 'interface': interface, 'ip6': pubip6(interface) } +""" % { 'interface': interface, 'ip6': admip6(interface) } - Probe_Mac = metadata.Probes["mac"].split('\n') If_Mac = dict(zip(Probe_Mac[:-1:2], Probe_Mac[1::2]))