[./Python/etc/network/interfaces] on evite de mettre la gateway de maniere inconditionnelle
Vive les boucles ! darcs-hash:20100417200849-8fbb1-a97762225e26ba40f63911f7e9d48cf8a17623fc.gz
This commit is contained in:
parent
eaea319e92
commit
7f3393f863
1 changed files with 13 additions and 9 deletions
|
@ -49,10 +49,7 @@ iface %(interface)s inet static
|
||||||
print " ", line
|
print " ", line
|
||||||
print
|
print
|
||||||
|
|
||||||
print """iface %(interface)s inet6 static
|
adm6(interface)
|
||||||
address %(ip6)s
|
|
||||||
netmask 64
|
|
||||||
""" % { 'interface': interface, 'ip6': admip6(interface) }
|
|
||||||
|
|
||||||
elif mode == "radin":
|
elif mode == "radin":
|
||||||
print """auto %(interface)s
|
print """auto %(interface)s
|
||||||
|
@ -131,13 +128,20 @@ def pubip6(If):
|
||||||
def admip6(If):
|
def admip6(If):
|
||||||
return "2a01:240:fe3d:c804:" + If_Mac[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
|
print """iface %(interface)s inet6 static
|
||||||
address %(ip6)s
|
address %(ip6)s
|
||||||
netmask 64
|
netmask 64
|
||||||
gateway fe80::219:bbff:fe31:3b80
|
""" % { 'interface': interface, 'ip6': admip6(interface) }
|
||||||
""" % { 'interface': interface, 'ip6': pubip6(interface) }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Probe_Mac = metadata.Probes["mac"].split('\n')
|
Probe_Mac = metadata.Probes["mac"].split('\n')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue