summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2001-04-09 12:49:16 +0000
committerYves Duret <yduret@mandriva.com>2001-04-09 12:49:16 +0000
commitd3176bb4255f769460392476b8613c1ff1a5ee16 (patch)
tree99e435fb9b12000e34059b8fec0ad844663d5b7a
parent0f4d34bfdb7b172cbc44a9a30b7ebdb4e96f4802 (diff)
downloaddrakx-d3176bb4255f769460392476b8613c1ff1a5ee16.tar
drakx-d3176bb4255f769460392476b8613c1ff1a5ee16.tar.gz
drakx-d3176bb4255f769460392476b8613c1ff1a5ee16.tar.bz2
drakx-d3176bb4255f769460392476b8613c1ff1a5ee16.tar.xz
drakx-d3176bb4255f769460392476b8613c1ff1a5ee16.zip
added lilo/grub mode
-rw-r--r--perl-install/bootlook.pm41
1 files changed, 36 insertions, 5 deletions
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm
index 151fd260c..ded6e9412 100644
--- a/perl-install/bootlook.pm
+++ b/perl-install/bootlook.pm
@@ -31,6 +31,7 @@ use standalone;
use common qw(:common :file :functional :system);
use my_gtk qw(:helpers :wrappers);
use any;
+#use Data::dumper;
setlocale (LC_ALL, "");
Locale::GetText::textdomain ("Bootlookdrake");
@@ -38,6 +39,7 @@ Locale::GetText::textdomain ("Bootlookdrake");
import Locale::GetText I_;
*_ = *I_;
+
$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~/--embedded (\S*) (\S*)/;
if ($::isEmbedded) {
print "EMBED\n";
@@ -111,16 +113,17 @@ my $global_vbox = new Gtk::VBox();
#$global_vbox->pack_start (new Gtk::Label(_("Boot style configuration")), 0, 0, 0);
# lilo/grub
-my $lilo_dedans = new Gtk::VBox(0, 10);
+my $lilo_dedans = new Gtk::HBox(0, 10);
$lilo_dedans->border_width (5);
-my $lilo_vbox = new Gtk::VBox(0, 0);
-$lilo_vbox->border_width (10);
+my $lilo_button = new Gtk::Button _("Configuration de Lilo/Grub");
+$lilo_dedans->pack_end($lilo_button,0,0,0);
+$lilo_button->signal_connect(clicked => sub { lilo_choice(); });
+
my $lilo_frame = new Gtk::Frame _("Lilo/grub mode");
-$lilo_frame->add($lilo_vbox);
+$lilo_frame->add($lilo_dedans);
$global_vbox->pack_start ($lilo_frame, 0, 0, 0);
-
######## aurora part
my $a_dedans = new Gtk::VBox(0, 5);
$a_dedans->border_width(5);
@@ -397,3 +400,31 @@ sub set_autologin {
{ USER => $user, AUTOLOGIN => bool2yesno($user), EXEC => "/usr/X11R6/bin/startx" });
# log::l("cat $prefix/etc/sysconfig/autologin: ", cat_("$prefix/etc/sysconfig/autologin"));
}
+
+
+############################
+sub lilo_choice
+{
+ my $bootloader = bootloader::read('', '/etc/lilo.conf');
+ local ($_) = `detectloader`;
+ $bootloader->{methods} = { lilo => 1, grub => !!/grub/i };
+
+ my ($hds) = catch_cdie { fsedit::hds([ detect_devices::hds() ], {}) } sub { 1 };
+ my $fstab = [ fsedit::get_fstab(@$hds) ];
+ fs::get_mntpoints_from_fstab($fstab);
+
+ $::expert=1;
+ # ask:
+
+ any::setupBootloader($in, $bootloader, $hds, $fstab, $ENV{SECURE_LEVEL}) or $in->exit(0);
+ # #eval { bootloader::install('', $bootloader, $fstab, $hds) };
+ print "ici\n";
+
+# if ($@) {
+# $in->ask_warn('',
+# [ _("Installation of LILO failed. The following error occured:"),
+# grep { !/^Warning:/ } cat_("/tmp/.error") ]);
+# unlink "/tmp/.error";
+# goto ask;
+# }
+}