[interfaces] On rajoute le mode "wifi"
Ignore-this: ed5cdf21645fc1041a188ecdef782ae0 (C'est pour dyson.wifi la fausse borne, mais ça pourrait servir à d'autres serveurs dans le futur) darcs-hash:20120809204343-28565-1244ceb247c99260f08032ad1338dea537989589.gz
This commit is contained in:
parent
a9cf8c989b
commit
8f93352960
2 changed files with 20 additions and 0 deletions
|
@ -38,6 +38,20 @@ iface %(interface)s inet static
|
|||
|
||||
pub6(interface)
|
||||
|
||||
elif mode == "wifi":
|
||||
print """auto %(interface)s
|
||||
iface %(interface)s inet static
|
||||
address %(ip)s
|
||||
network 138.231.144.0
|
||||
netmask 255.255.248.0
|
||||
broadcast 138.231.148.255
|
||||
dns-nameservers 138.231.148.1
|
||||
dns-search wifi.crans.org""" % { 'interface': interface, 'ip': wifiip() }
|
||||
|
||||
for line in additionnals:
|
||||
print " ", line
|
||||
print
|
||||
|
||||
elif mode == "adm":
|
||||
print """auto %(interface)s
|
||||
iface %(interface)s inet static
|
||||
|
|
|
@ -14,12 +14,18 @@ def pubipof(hostname):
|
|||
def admipof(hostname):
|
||||
return socket.gethostbyname(hostname + ".adm.crans.org")
|
||||
|
||||
def wifiipof(hostname):
|
||||
return socket.gethostbyname(hostname + ".wifi.crans.org")
|
||||
|
||||
def pubip():
|
||||
return pubipof(hostname)
|
||||
|
||||
def admip():
|
||||
return admipof(hostname)
|
||||
|
||||
def wifiip():
|
||||
return wifiipof(hostname)
|
||||
|
||||
def radinip():
|
||||
if has("vlan-radin"):
|
||||
return '10.42.0.1'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue