Commit e79e5c02 authored by Daniel STAN's avatar Daniel STAN

gestion: suggestion <automatique> si wifi ou chbre

parent 9b179328
......@@ -2676,18 +2676,11 @@ def menu_principal():
try:
if choix == 'Fixe':
becane = MachineFixe(proprio)
#Saisie prédictive de la mac
try:
prise = proprio.chbre().lower()[0] + becane.prise()
becane.ip("<automatique>", lock=False)
f = open('/usr/scripts/var/last_macs/' + prise, 'r')
becane.mac(f.read(), lock=False)
f.close()
except:
pass
elif choix == 'Wifi':
becane = MachineWifi(proprio)
# Suggestion: ne pas relever la mac
if choix == 'Wifi' or (choix == 'Fixe' and proprio.chbre() not in ['', 'EXT']):
becane.mac("<automatique>")
except ValueError, c:
arg = u'--title "Nouvelle machine" '
arg += u'--msgbox "%s\n\n\n" 0 0' % to_unicode(c.args[0])
......
......@@ -3029,8 +3029,9 @@ class Machine(BaseClasseCrans):
mac = format_mac(mac)
if mac == '<automatique>':
multi_ok = True
lock = False
self._set('macAddress', [mac])
self.ipv6('')
return mac
# La MAC serait-elle une MAC à la con ?
if mac == "00:04:4b:80:80:03":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment