From 60ca8dcc1f62b6fa150b679d35d7bcab544def30 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 27 Feb 2013 17:44:12 +0000 Subject: (install_grub2) simplify (factorize a variable) --- perl-install/bootloader.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 44e85e635..5c89d055b 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -2008,8 +2008,9 @@ sub install_grub2 { my ($bootloader, $all_hds) = @_; my $error; write_grub2($bootloader, $all_hds); - run_program::rooted($::prefix, 'grub2-install', '2>', \$error, $bootloader->{boot}) or die "grub2-install failed: $error"; - setVarsInSh("$::prefix/boot/grub2/drakboot.conf", { boot => $bootloader->{boot} }); + my $boot = $bootloader->{boot} + run_program::rooted($::prefix, 'grub2-install', '2>', \$error, $boot) or die "grub2-install failed: $error"; + setVarsInSh("$::prefix/boot/grub2/drakboot.conf", { boot => $boot }); } sub install_grub { -- cgit v1.2.1