Revisión 66
Añadido por jredrejo hace más de 14 años
configura_hostapd.py | ||
---|---|---|
logging.getLogger().error("Hay un error el el fichero horario.txt en el servidor de aula")
|
||
return ""
|
||
else:
|
||
copy("/etc/hostapd/hostapd.accept","/etc/hostapd/hostapd.accept.bak")
|
||
try:
|
||
copy("/etc/hostapd/hostapd.accept","/etc/hostapd/hostapd.accept.bak")
|
||
except:
|
||
pass
|
||
f=open(destino,"r")
|
||
if not os.path.exists("/etc/hostapd"):
|
||
try:
|
||
... | ... | |
#si un profesor de guardia hace login, se autorizan automáticamente los
|
||
#alumnos que hubiera autorizado el profesor anterior:
|
||
if not esta_en_horario:
|
||
copy("/etc/hostapd/hostapd.accept.bak","/etc/hostapd/hostapd.accept")
|
||
try:
|
||
copy("/etc/hostapd/hostapd.accept.bak","/etc/hostapd/hostapd.accept")
|
||
except:
|
||
pass
|
||
|
||
return g
|
||
|
||
... | ... | |
encontradoSsid = False
|
||
for numlinea in range(0, len(lineas)):
|
||
linea = lineas[numlinea]
|
||
#comprobamos si estamos en channel o en ssid
|
||
if linea[:7] == "channel":
|
||
encontradoChannel = True
|
||
lineas[numlinea] = "channel="+str(canaloptimo)+"\n"
|
||
if linea[:4] == "ssid":
|
||
encontradoSsid = True
|
||
lineas[numlinea] = "ssid="+ssid+"\n"
|
||
#comprobamos si estamos en channel o en ssid
|
||
if linea[:7] == "channel":
|
||
encontradoChannel = True
|
||
lineas[numlinea] = "channel="+str(canaloptimo)+"\n"
|
||
if linea[:4] == "ssid":
|
||
encontradoSsid = True
|
||
lineas[numlinea] = "ssid="+ssid+"\n"
|
||
if not encontradoChannel:
|
||
lineas.append("channel="+str(canaloptimo)+"\n")
|
||
if not encontradoSsid:
|
Exportar a: Unified diff
contempla alguna posibilidad más