diff --git a/gestion/gen_confs/wifi_ng.py b/gestion/gen_confs/wifi_ng.py index 43464969..6316f231 100755 --- a/gestion/gen_confs/wifi_ng.py +++ b/gestion/gen_confs/wifi_ng.py @@ -82,9 +82,10 @@ class conf_wifi(gen_config) : name)) # Et on copie for name in files: - shutil.copy(os.path.join(root, name), - os.path.join("%s%s" % (WORK, root[len(top):]), - name)) + if name.endswith("~"): + shutil.copy(os.path.join(root, name), + os.path.join("%s%s" % (WORK, root[len(top):]), + name)) # On créé/complète le fichier /etc/nvram.updates fd = file(os.path.join(WORK, "etc", "nvram.updates"), "w+") 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), } 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_wan_hostname=%(HOST)s NVRAM_crans_channels=%(CANAL)s @@ -106,7 +107,7 @@ NVRAM_wl0_radio=%(ON)d # la description. for info in borne.info(): if info.startswith(""): - 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.close()