Ne copie pas les fichiers de backup
darcs-hash:20050904114702-d1718-2ccc2dd1080df0f1aa5b97c452d80791572a3df4.gz
This commit is contained in:
parent
fa4c2b68a8
commit
be681fcb31
1 changed files with 6 additions and 5 deletions
|
@ -82,9 +82,10 @@ class conf_wifi(gen_config) :
|
||||||
name))
|
name))
|
||||||
# Et on copie
|
# Et on copie
|
||||||
for name in files:
|
for name in files:
|
||||||
shutil.copy(os.path.join(root, name),
|
if name.endswith("~"):
|
||||||
os.path.join("%s%s" % (WORK, root[len(top):]),
|
shutil.copy(os.path.join(root, name),
|
||||||
name))
|
os.path.join("%s%s" % (WORK, root[len(top):]),
|
||||||
|
name))
|
||||||
# On créé/complète le fichier /etc/nvram.updates
|
# On créé/complète le fichier /etc/nvram.updates
|
||||||
fd = file(os.path.join(WORK, "etc", "nvram.updates"), "w+")
|
fd = file(os.path.join(WORK, "etc", "nvram.updates"), "w+")
|
||||||
data = { 'HOST': borne.nom().split('.')[0],
|
data = { 'HOST': borne.nom().split('.')[0],
|
||||||
|
@ -94,7 +95,7 @@ class conf_wifi(gen_config) :
|
||||||
'ON': ((int(borne.puissance() or 0) > 0) and 1 or 0),
|
'ON': ((int(borne.puissance() or 0) > 0) and 1 or 0),
|
||||||
}
|
}
|
||||||
fd.write("""
|
fd.write("""
|
||||||
variables=${variables} lan_ipaddr wan_hostname crans_channels txpower
|
variables="${variables} lan_ipaddr wan_hostname crans_channels txpower"
|
||||||
NVRAM_lan_ipaddr=%(IP)s
|
NVRAM_lan_ipaddr=%(IP)s
|
||||||
NVRAM_wan_hostname=%(HOST)s
|
NVRAM_wan_hostname=%(HOST)s
|
||||||
NVRAM_crans_channels=%(CANAL)s
|
NVRAM_crans_channels=%(CANAL)s
|
||||||
|
@ -106,7 +107,7 @@ NVRAM_wl0_radio=%(ON)d
|
||||||
# la description.
|
# la description.
|
||||||
for info in borne.info():
|
for info in borne.info():
|
||||||
if info.startswith("<nvram>"):
|
if info.startswith("<nvram>"):
|
||||||
fd.write("variables=${variables} %s\n" % info[7:].split("=")[0])
|
fd.write('variables="${variables} %s"\n' % info[7:].split("=")[0])
|
||||||
fd.write("NVRAM_%s\n" % info[7:])
|
fd.write("NVRAM_%s\n" % info[7:])
|
||||||
fd.close()
|
fd.close()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue