From 395c3771b02e88b20a2129b4a3641acee4049ab7 Mon Sep 17 00:00:00 2001 From: Mike khiretskiy Date: Thu, 5 Sep 2013 15:43:26 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=BA=D0=BB=D1=8E=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5?= =?UTF-8?q?=D0=B9=D1=81=D0=B0=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BD=D0=B5?= =?UTF-8?q?=D1=82=20=D0=BB=D0=B8=D0=BD=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install/variables/net.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/variables/net.py b/install/variables/net.py index cc59dab..a7f2df2 100644 --- a/install/variables/net.py +++ b/install/variables/net.py @@ -26,7 +26,7 @@ setLocalTranslate('cl_install3',sys.modules[__name__]) from calculate.lib.utils.ip import (getInterfaces,getIp,getMask,getMac, cidrToMask,maskToCidr,getIpNet,isDhcpIp,checkIp,checkMask, - getOperState) + getOperState,getPlugged) from calculate.lib.utils.device import lspci from calculate.lib.utils.files import listDirectory,readLinesFile,process,\ readFile @@ -261,6 +261,8 @@ class VariableOsInstallNetStatus(NetHelper,Variable): def getDefaultValue(self,iface): def statusValue(ipaddr,dhcp): + if not getPlugged(iface): + return 'off' if dhcp == "on": return "dhcp" elif ipaddr: