summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-24 13:02:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-24 13:02:17 +0000
commit04a060ad1793bf80c7bfbaaf784d8d3b669ad83a (patch)
tree0162f6226b19d90d6e65f364106df0ec00217659 /perl-install
parentd3f8e92b341f4a2ddc15405358071cc99dc6eb73 (diff)
downloaddrakx-04a060ad1793bf80c7bfbaaf784d8d3b669ad83a.tar
drakx-04a060ad1793bf80c7bfbaaf784d8d3b669ad83a.tar.gz
drakx-04a060ad1793bf80c7bfbaaf784d8d3b669ad83a.tar.bz2
drakx-04a060ad1793bf80c7bfbaaf784d8d3b669ad83a.tar.xz
drakx-04a060ad1793bf80c7bfbaaf784d8d3b669ad83a.zip
ensure grub is installed if grub is chosen
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index cd1438d56..04ed13e32 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -82,6 +82,13 @@ sub enableMD5Shadow { #- NO MORE USED
} grep { -r $_ } map { "$prefix/etc/pam.d/$_" } qw(login rlogin passwd);
}
+sub grub_installed {
+ my ($in) = @_;
+ my $f = "/usr/sbin/grub";
+ $in->do_pkgs->install('grub') if !-e $f;
+ -e $f;
+}
+
sub setupBootloader {
my ($in, $b, $all_hds, $fstab, $security, $prefix, $more) = @_;
my $hds = $all_hds->{hds};
@@ -196,6 +203,9 @@ sub setupBootloader {
$b->{methods}{$_} = 0 foreach keys %{$b->{methods}};
$bootloaders{$bootloader} and $bootloaders{$bootloader}->();
+
+ grub_installed($in) or return 1 if $b->{methods}{grub};
+
#- at least one method
grep_each { $::b } %{$b->{methods}} or return 0;