summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-04-03 18:23:39 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-04-03 18:23:39 +0200
commitb0039ed72e22303c213539ed68315fd90c3c73f1 (patch)
tree6c1f57ba14aad8c15a4c93d5ab9bb67eb469595d /perl-install
parentdf8433f2db7142b045a80391b74c21057a92b2d3 (diff)
downloaddrakx-b0039ed72e22303c213539ed68315fd90c3c73f1.tar
drakx-b0039ed72e22303c213539ed68315fd90c3c73f1.tar.gz
drakx-b0039ed72e22303c213539ed68315fd90c3c73f1.tar.bz2
drakx-b0039ed72e22303c213539ed68315fd90c3c73f1.tar.xz
drakx-b0039ed72e22303c213539ed68315fd90c3c73f1.zip
factorize command call
(needed for next commit)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index b33b7eed2..d85a02d39 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1973,11 +1973,8 @@ sub install_raw_grub2 {
my ($boot) = @_;
my $error;
# if (member($boot, map { "/dev/$_->{device}" } @{$all_hds->{hds}}) {
- if ($boot =~ /\d$/) {
- run_program::rooted($::prefix, 'grub2-install', '2>', \$error, '--grub-setup=/bin/true', $boot) or die "grub2-install failed: $error";
- } else {
- run_program::rooted($::prefix, 'grub2-install', '2>', \$error, $boot) or die "grub2-install failed: $error";
- }
+ my @options = $boot =~ /\d$/ ? ('--grub-setup=/bin/true', $boot) : $boot;
+ run_program::rooted($::prefix, 'grub2-install', '2>', \$error, '--grub-setup=/bin/true', @options) or die "grub2-install failed: $error";
setVarsInSh("$::prefix/boot/grub2/drakboot.conf", { boot => $boot });
}