|
|
|
@ -520,6 +520,26 @@ class VariableOsInstallNetNmroute(VariableOsInstallNetRoute):
|
|
|
|
|
x[NET]!="default",routeMatrix))))
|
|
|
|
|
return self.performRouteData(getRouteForInterfaceNM)
|
|
|
|
|
|
|
|
|
|
class VariableOsInstallNetConfAvailable(NetVariable):
|
|
|
|
|
"""
|
|
|
|
|
Available net configuration
|
|
|
|
|
"""
|
|
|
|
|
type = "list"
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
mapNetConf = (('networkmanager','net-misc/networkmanager',
|
|
|
|
|
_("NetworkManager")),
|
|
|
|
|
('openrc','',_('OpenRC')))
|
|
|
|
|
image = self.Get('cl_image')
|
|
|
|
|
if image:
|
|
|
|
|
with image as distr:
|
|
|
|
|
distrPath = image.getDirectory()
|
|
|
|
|
return map(itemgetter(0,2),
|
|
|
|
|
filter(lambda x:not x[1] or isPkgInstalled(x[1],
|
|
|
|
|
prefix=distrPath),
|
|
|
|
|
mapNetConf))
|
|
|
|
|
return map(itemgetter(0,2),mapNetConf[-1:])
|
|
|
|
|
|
|
|
|
|
class VariableOsInstallNetConf(NetVariable):
|
|
|
|
|
"""
|
|
|
|
|
Net setup (networkmanager or openrc)
|
|
|
|
@ -541,24 +561,14 @@ class VariableOsInstallNetConf(NetVariable):
|
|
|
|
|
nm = "networkmanager"
|
|
|
|
|
else:
|
|
|
|
|
nm = ""
|
|
|
|
|
for val,comment in self.choice():
|
|
|
|
|
for val,comment in self.Get('os_install_net_conf_available'):
|
|
|
|
|
if nm == val:
|
|
|
|
|
return nm
|
|
|
|
|
else:
|
|
|
|
|
return "openrc"
|
|
|
|
|
|
|
|
|
|
def choice(self):
|
|
|
|
|
mapNetConf = (('networkmanager','net-misc/networkmanager',_("NetworkManager")),
|
|
|
|
|
('openrc','',_('OpenRC')))
|
|
|
|
|
image = self.Get('cl_image')
|
|
|
|
|
if image:
|
|
|
|
|
with image as distr:
|
|
|
|
|
distrPath = image.getDirectory()
|
|
|
|
|
return map(itemgetter(0,2),
|
|
|
|
|
filter(lambda x:not x[1] or isPkgInstalled(x[1],
|
|
|
|
|
prefix=distrPath),
|
|
|
|
|
mapNetConf))
|
|
|
|
|
return map(itemgetter(0,2),mapNetConf[-1:])
|
|
|
|
|
return self.Get('os_install_net_conf_available')
|
|
|
|
|
|
|
|
|
|
class VariableOsInstallNetDnsSearch(NetVariable):
|
|
|
|
|
"""
|
|
|
|
|