Update detect off interfaces

master3.3
Mike Hiretsky 12 years ago
parent ef467572bf
commit ae13a44ba5

@ -25,7 +25,8 @@ from calculate.lib.cl_lang import setLocalTranslate
setLocalTranslate('cl_install3',sys.modules[__name__])
from calculate.lib.utils.ip import (getInterfaces,getIp,getMask,getMac,
cidrToMask,maskToCidr,getIpNet,isDhcpIp,checkIp,checkMask)
cidrToMask,maskToCidr,getIpNet,isDhcpIp,checkIp,checkMask,
getOperState)
from calculate.lib.utils.device import lspci
from calculate.lib.utils.files import listDirectory,readLinesFile,process
from calculate.lib.utils import ip
@ -259,7 +260,10 @@ class VariableOsInstallNetStatus(NetHelper,Variable):
elif ipaddr:
return ipaddr
else:
return "off"
if getOperState(iface) == 'down':
return "off"
else:
"dhcp"
rootDevNfs = self.Get('os_root_dev') == '/dev/nfs'
return statusValue(getIp(iface),"on" \
if rootDevNfs or isDhcpIp(iface) else "off")

Loading…
Cancel
Save