|
|
|
@ -1366,7 +1366,7 @@ class VariableClLivemenuPath(ReadonlyVariable):
|
|
|
|
|
"""
|
|
|
|
|
Текущий путь до репозитория образов
|
|
|
|
|
"""
|
|
|
|
|
grub_config = "/etc/grub.d/90_calculate"
|
|
|
|
|
grub_config = "/etc/grub.d/35_calculate"
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
data = readFile(self.grub_config)
|
|
|
|
@ -1396,7 +1396,7 @@ class VariableClBuilderLivemenuPath(Variable):
|
|
|
|
|
type = "choiceedit"
|
|
|
|
|
metavalue = "PATH"
|
|
|
|
|
untrusted = True
|
|
|
|
|
none_humanreadable = __("Clear live images from boot menu")
|
|
|
|
|
none_humanreadable = __("Clear the boot from ISO images")
|
|
|
|
|
|
|
|
|
|
def init(self):
|
|
|
|
|
self.help = _("set path")
|
|
|
|
@ -1489,7 +1489,7 @@ class VariableClBuilderLivemenuPath(Variable):
|
|
|
|
|
livemenu_type = self.Get('cl_builder_livemenu_type')
|
|
|
|
|
if livemenu_type == "flash":
|
|
|
|
|
if not value:
|
|
|
|
|
raise VariableError(_("Please specify Flash drive"))
|
|
|
|
|
raise VariableError(_("Please specify the Flash drive"))
|
|
|
|
|
if not path.exists(value):
|
|
|
|
|
raise VariableError(_("Flash drive %s not found") % value)
|
|
|
|
|
if not self.Get('cl_builder_flash_path'):
|
|
|
|
@ -1497,26 +1497,27 @@ class VariableClBuilderLivemenuPath(Variable):
|
|
|
|
|
else:
|
|
|
|
|
root_type_ext = self.Get('os_root_type_ext')
|
|
|
|
|
if not value and root_type_ext in RootType.IsoScanGrub:
|
|
|
|
|
raise VariableError(_("Please specify images directory"))
|
|
|
|
|
raise VariableError(_("Please specify the images directory"))
|
|
|
|
|
if (not path.exists(value) or value.startswith('/dev') or
|
|
|
|
|
not path.isdir(value)) and value:
|
|
|
|
|
raise VariableError(_("Please specify directory"))
|
|
|
|
|
raise VariableError(_("Please specify the directory"))
|
|
|
|
|
if root_type_ext in RootType.Grubable:
|
|
|
|
|
if root_type_ext in RootType.IsoScanGrub:
|
|
|
|
|
grub_rep = self.get_isoscan_grub_repository()
|
|
|
|
|
if grub_rep and value != grub_rep:
|
|
|
|
|
raise VariableError(
|
|
|
|
|
_("You cannot change images directory"))
|
|
|
|
|
_("You cannot change the images directory"))
|
|
|
|
|
else:
|
|
|
|
|
if value:
|
|
|
|
|
gc = GrubCommand()
|
|
|
|
|
if not gc.is_available(value):
|
|
|
|
|
raise VariableError(
|
|
|
|
|
_("%s is unavailable for grub") % value)
|
|
|
|
|
_("%s is unavailable for the Grub") % value)
|
|
|
|
|
else:
|
|
|
|
|
grub_file = path.join(value, "grub.cfg")
|
|
|
|
|
if not path.exists(grub_file):
|
|
|
|
|
raise VariableError(_("Please specify LiveHDD directory"))
|
|
|
|
|
raise VariableError(
|
|
|
|
|
_("Please specify the LiveHDD directory"))
|
|
|
|
|
|
|
|
|
|
def set(self, value):
|
|
|
|
|
if value == "none":
|
|
|
|
|