Add check package for PXE installation.

master
Mike Hiretsky 13 years ago
parent 92ca4eb7f5
commit 447bd2d397

@ -28,7 +28,8 @@ from cl_utils import runOsCommand,appendProgramToEnvFile, \
detectDeviceForPartition,listDirectory, \ detectDeviceForPartition,listDirectory, \
cmpVersion,STDOUT,getUdevDeviceInfo, \ cmpVersion,STDOUT,getUdevDeviceInfo, \
getLvmPartitions,getInstalledVideo, \ getLvmPartitions,getInstalledVideo, \
getSupportArch, refreshLVM, refreshUdev getSupportArch, refreshLVM, refreshUdev, \
isPkgInstalled
from cl_vars_share import varsShare from cl_vars_share import varsShare
from cl_kernel_utils import KernelConfig,InitRamFs from cl_kernel_utils import KernelConfig,InitRamFs
@ -2442,6 +2443,8 @@ class cl_install(color_print, SignalInterrupt):
distrCopy = False distrCopy = False
if not self.checkCorrectBootRecordDisk(): if not self.checkCorrectBootRecordDisk():
return False return False
if pxe and not self.checkNeedPxePkg():
return False
try: try:
rootPartdev = self.clVars.Get('os_install_root_dev') rootPartdev = self.clVars.Get('os_install_root_dev')
rootPartCmdList = filter(lambda x: x['dev']==rootPartdev, rootPartCmdList = filter(lambda x: x['dev']==rootPartdev,
@ -2730,3 +2733,13 @@ the system") + " (yes/no)"
if march == "auto": if march == "auto":
march = getSupportArch()[-1] march = getSupportArch()[-1]
self.clVars.Set('os_install_arch_machine', march, True) self.clVars.Set('os_install_arch_machine', march, True)
def checkNeedPxePkg(self):
"""Check need for --pxe packages"""
for pkg in ['net-misc/dhcp','net-ftp/tftp-hpa','net-fs/nfs-utils']:
if not isPkgInstalled(pkg):
self.printERROR(
_("You must to install %s package for PXE installation")
%pkg)
return False
return True

Loading…
Cancel
Save