From 102c44bdec2ceed13b579a8780d119a2a74f2034 Mon Sep 17 00:00:00 2001 From: Mike Khiretskiy Date: Tue, 9 Dec 2014 11:20:58 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA?= =?UTF-8?q?=D0=B0=20grub2.02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/install/install.py | 8 ++++---- pym/install/variables/system.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pym/install/install.py b/pym/install/install.py index 7c0242f..5381246 100644 --- a/pym/install/install.py +++ b/pym/install/install.py @@ -241,7 +241,7 @@ class Install: "--target=x86_64-efi", "--efi-directory=%s"% target.getEfiDirectory(), - "-f"] + "--force"] # в случае установки на usb-hdd EFI загрузчик не прописывается # в efivars if self.clVars.Get('os_install_root_type') == 'usb-hdd': @@ -281,8 +281,8 @@ class Install: # если GRUB2 версии 2.00 и выше, обычная установка требует # параметра --target=i386-pc, иначе GRUB2 может попытаться # прописать себя как UEFI - if filter(lambda x:"2.00" in x, - process(cmdGrubInstall,'-v')): + if filter(lambda x:"2." in x, + process(cmdGrubInstall,'--version')): platform = ["--target=i386-pc"] else: platform = [] @@ -291,7 +291,7 @@ class Install: grubProcess = process(cmdGrubInstall, "--boot-directory=%s"%pathJoin(prefixBoot, target.getBootDirectory()), - mbrDisk, "-f", *platform, + mbrDisk, "--force", *platform, stderr=STDOUT,envdict=os.environ) if grubProcess.failed(): raise DistributiveError(_("Failed to install the bootloader")) diff --git a/pym/install/variables/system.py b/pym/install/variables/system.py index bbe5926..08a0006 100644 --- a/pym/install/variables/system.py +++ b/pym/install/variables/system.py @@ -533,8 +533,8 @@ class VariableOsGrub2Path(Variable): return grubInstall # find grub-install and check, that this is grub2-install (ver 1.99) grubInstall = getProgPath('/usr/sbin/grub-install') - if grubInstall and filter(lambda x:"1.99" in x or "2.00" in x, - process(grubInstall,'-v')): + if grubInstall and filter(lambda x:"1.99" in x or "2." in x, + process(grubInstall,'--version')): return grubInstall return ""