|
|
|
@ -27,7 +27,8 @@ from subprocess import PIPE,STDOUT
|
|
|
|
|
from shutil import copy2
|
|
|
|
|
from calculate.core.server.func import safetyWrapper
|
|
|
|
|
from calculate.lib.utils.files import (runOsCommand,pathJoin,scanDirectory,
|
|
|
|
|
process,listDirectory,STDOUT,checkUtils)
|
|
|
|
|
isMount,process,listDirectory,STDOUT,
|
|
|
|
|
checkUtils)
|
|
|
|
|
from calculate.lib.utils.common import (appendProgramToEnvFile,
|
|
|
|
|
removeProgramToEnvFile, getTupleVersion,
|
|
|
|
|
cmpVersion,getUserPassword,
|
|
|
|
@ -384,11 +385,15 @@ class Install(color_print):
|
|
|
|
|
grubParams = ["--boot-directory=%s"%pathJoin(prefixBoot,
|
|
|
|
|
target.getBootDirectory()),
|
|
|
|
|
"--target=x86_64-efi",
|
|
|
|
|
"--efi-directory=%s"%pathJoin(prefixBoot,
|
|
|
|
|
target.getEfiDirectory()),
|
|
|
|
|
"--efi-directory=%s"%
|
|
|
|
|
target.getEfiDirectory(),
|
|
|
|
|
"-f"]
|
|
|
|
|
if self.clVars.Get('os_install_root_type') == 'usb-hdd':
|
|
|
|
|
grubParams.append("--removable")
|
|
|
|
|
if self.clVars.Get('cl_action') != "system" and \
|
|
|
|
|
not isMount('/boot/efi'):
|
|
|
|
|
raise DistributiveError(_("Failed to install the bootloader. "
|
|
|
|
|
"/boot/efi is not mounted."))
|
|
|
|
|
grubProcess = process(cmdGrubInstall,
|
|
|
|
|
*grubParams, stderr=STDOUT,envdict=os.environ)
|
|
|
|
|
if grubProcess.failed():
|
|
|
|
|