|
|
|
@ -631,13 +631,15 @@ class VariableOsInstallPxe(Variable):
|
|
|
|
|
raise VariableError(
|
|
|
|
|
_("For PXE install, you need to install package %s")
|
|
|
|
|
% pkg)
|
|
|
|
|
try:
|
|
|
|
|
config = cl_ini_parser.iniParser('/etc/calculate/calculate.env')
|
|
|
|
|
val = config.getVar('server', 'sr_dhcp_set')
|
|
|
|
|
if val.encode('utf-8') == "on":
|
|
|
|
|
return
|
|
|
|
|
except Exception:
|
|
|
|
|
pass
|
|
|
|
|
for env_fn in ('/etc/calculate/calculate.env',
|
|
|
|
|
'/var/lib/calculate/calculate.env'):
|
|
|
|
|
try:
|
|
|
|
|
config = cl_ini_parser.iniParser(env_fn)
|
|
|
|
|
val = config.getVar('server', 'sr_dhcp_set')
|
|
|
|
|
if val.encode('utf-8') == "on":
|
|
|
|
|
return
|
|
|
|
|
except Exception:
|
|
|
|
|
pass
|
|
|
|
|
raise VariableError(
|
|
|
|
|
_("PXE install is only available if the DHCP "
|
|
|
|
|
"service has been configured first"))
|
|
|
|
|