|
|
@ -29,6 +29,7 @@ from cl_utils import runOsCommand,appendProgramToEnvFile, \
|
|
|
|
from cl_kernel_utils import KernelConfig,InitRamFs
|
|
|
|
from cl_kernel_utils import KernelConfig,InitRamFs
|
|
|
|
|
|
|
|
|
|
|
|
import cl_overriding
|
|
|
|
import cl_overriding
|
|
|
|
|
|
|
|
from StringIO import StringIO
|
|
|
|
|
|
|
|
|
|
|
|
install_errors = ""
|
|
|
|
install_errors = ""
|
|
|
|
def installExit(*args,**kwars):
|
|
|
|
def installExit(*args,**kwars):
|
|
|
@ -770,6 +771,8 @@ class cl_install(color_print):
|
|
|
|
self.listBindsOptions = []
|
|
|
|
self.listBindsOptions = []
|
|
|
|
self.listSwapsOptions = []
|
|
|
|
self.listSwapsOptions = []
|
|
|
|
self.startMessage = ""
|
|
|
|
self.startMessage = ""
|
|
|
|
|
|
|
|
self.stdoutHide = None
|
|
|
|
|
|
|
|
self.stderrHide = None
|
|
|
|
Spinner().setWriteFunc(self.defaultPrint)
|
|
|
|
Spinner().setWriteFunc(self.defaultPrint)
|
|
|
|
|
|
|
|
|
|
|
|
def setNoColor(self):
|
|
|
|
def setNoColor(self):
|
|
|
@ -1570,6 +1573,22 @@ class cl_install(color_print):
|
|
|
|
os.unlink(nvidiaMaskFile)
|
|
|
|
os.unlink(nvidiaMaskFile)
|
|
|
|
return res
|
|
|
|
return res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def hideStdout(self):
|
|
|
|
|
|
|
|
if not self.stdoutHide:
|
|
|
|
|
|
|
|
self.stdoutHide = sys.stdout
|
|
|
|
|
|
|
|
self.stderrHide = sys.stderr
|
|
|
|
|
|
|
|
sys.stdout = StringIO()
|
|
|
|
|
|
|
|
sys.stderr = StringIO()
|
|
|
|
|
|
|
|
sys.stdout.fileno = self.stdoutHide.fileno
|
|
|
|
|
|
|
|
sys.stderr.fileno = self.stderrHide.fileno
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def showStdout(self):
|
|
|
|
|
|
|
|
if self.stdoutHide:
|
|
|
|
|
|
|
|
sys.stdout = self.stdoutHide
|
|
|
|
|
|
|
|
sys.stderr = self.stderrHide
|
|
|
|
|
|
|
|
self.stdoutHide = None
|
|
|
|
|
|
|
|
self.stderrHide = None
|
|
|
|
|
|
|
|
|
|
|
|
def configureSystem(self):
|
|
|
|
def configureSystem(self):
|
|
|
|
"""configure current system"""
|
|
|
|
"""configure current system"""
|
|
|
|
configureMessage = _("Configure system")
|
|
|
|
configureMessage = _("Configure system")
|
|
|
@ -1589,9 +1608,14 @@ class cl_install(color_print):
|
|
|
|
if path.exists(desktopLib):
|
|
|
|
if path.exists(desktopLib):
|
|
|
|
sys.path.insert(0, path.abspath(desktopLib))
|
|
|
|
sys.path.insert(0, path.abspath(desktopLib))
|
|
|
|
from cl_desktop import desktop
|
|
|
|
from cl_desktop import desktop
|
|
|
|
|
|
|
|
self.printMessageForTest(
|
|
|
|
|
|
|
|
_("Link calculate-desktop to package configuration"))
|
|
|
|
|
|
|
|
self.hideStdout()
|
|
|
|
objDesktop = desktop()
|
|
|
|
objDesktop = desktop()
|
|
|
|
objDesktop.createClVars()
|
|
|
|
objDesktop.createClVars()
|
|
|
|
objDesktop.installProg()
|
|
|
|
objDesktop.installProg()
|
|
|
|
|
|
|
|
self.showStdout()
|
|
|
|
|
|
|
|
self.printByResult(True)
|
|
|
|
|
|
|
|
|
|
|
|
# install client package
|
|
|
|
# install client package
|
|
|
|
if linuxShortname in ("CLD","CLDG","CLDX"):
|
|
|
|
if linuxShortname in ("CLD","CLDG","CLDX"):
|
|
|
@ -1599,12 +1623,17 @@ class cl_install(color_print):
|
|
|
|
if path.exists(clientLib):
|
|
|
|
if path.exists(clientLib):
|
|
|
|
sys.path.insert(0, path.abspath(clientLib))
|
|
|
|
sys.path.insert(0, path.abspath(clientLib))
|
|
|
|
from cl_client import client
|
|
|
|
from cl_client import client
|
|
|
|
|
|
|
|
self.printMessageForTest(
|
|
|
|
|
|
|
|
_("Link calculate-client to package configuration"))
|
|
|
|
objClient = client()
|
|
|
|
objClient = client()
|
|
|
|
objClient.createClVars()
|
|
|
|
objClient.createClVars()
|
|
|
|
|
|
|
|
self.hideStdout()
|
|
|
|
if hasattr(objClient,"updateEnvFiles") and \
|
|
|
|
if hasattr(objClient,"updateEnvFiles") and \
|
|
|
|
objClient.updateEnvFiles():
|
|
|
|
objClient.updateEnvFiles():
|
|
|
|
objClient.clVars.flIniFile()
|
|
|
|
objClient.clVars.flIniFile()
|
|
|
|
objClient.installProg()
|
|
|
|
objClient.installProg()
|
|
|
|
|
|
|
|
self.showStdout()
|
|
|
|
|
|
|
|
self.printByResult(True)
|
|
|
|
|
|
|
|
|
|
|
|
objUsers = currentUsers()
|
|
|
|
objUsers = currentUsers()
|
|
|
|
if self.clVars.Get('os_root_type') == "livecd":
|
|
|
|
if self.clVars.Get('os_root_type') == "livecd":
|
|
|
@ -1631,6 +1660,7 @@ class cl_install(color_print):
|
|
|
|
keyInter = True
|
|
|
|
keyInter = True
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
keyInter = True
|
|
|
|
keyInter = True
|
|
|
|
|
|
|
|
self.showStdout()
|
|
|
|
if keyInter:
|
|
|
|
if keyInter:
|
|
|
|
if self.startMessage:
|
|
|
|
if self.startMessage:
|
|
|
|
self.printByResult(False)
|
|
|
|
self.printByResult(False)
|
|
|
|