diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-03 18:23:39 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-27 17:56:11 +0200 |
commit | 707e5451506b24fcef93c4c5ca6f3e53691733ab (patch) | |
tree | 798064c1de285e01a3c9cc2cfb3c10020c58404a /perl-install | |
parent | 77cd051688f1e8aae47aed0c8ac40ea45360461a (diff) | |
download | drakx-707e5451506b24fcef93c4c5ca6f3e53691733ab.tar drakx-707e5451506b24fcef93c4c5ca6f3e53691733ab.tar.gz drakx-707e5451506b24fcef93c4c5ca6f3e53691733ab.tar.bz2 drakx-707e5451506b24fcef93c4c5ca6f3e53691733ab.tar.xz drakx-707e5451506b24fcef93c4c5ca6f3e53691733ab.zip |
factorize command call
(needed for next commit)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index dea5bf0bd..6f1644bed 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -2022,11 +2022,8 @@ sub install_grub2 { write_grub2($bootloader, $all_hds); my $boot = $bootloader->{boot}; # 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 }); } |