From 75bcbea29b0dba1954344cc78b9ecb75e5007bfa Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 30 Mar 2000 23:25:44 +0000 Subject: no_comment --- perl-install/standalone/adduserdrake | 2 +- perl-install/standalone/diskdrake | 4 ++-- perl-install/standalone/drakboot | 42 ++++++++++++++++++++++++++++++++++++ perl-install/standalone/drakxconf | 4 ++-- 4 files changed, 47 insertions(+), 5 deletions(-) create mode 100755 perl-install/standalone/drakboot (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake index 7ead7679b..1d2eeb9c5 100755 --- a/perl-install/standalone/adduserdrake +++ b/perl-install/standalone/adduserdrake @@ -1,6 +1,6 @@ #!/usr/bin/perl -use lib qw(.); #/usr/lib/libDrakX); +use lib qw(/usr/lib/libDrakX); use common qw(:common :functional :system :file); use interactive; diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index 242f07c6d..6696f29f4 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -22,7 +22,7 @@ # DiskDrake is also based upon the libfdisk and the install from Red Hat Software -use lib "."; #qw(/usr/lib/libDrakX); +use lib qw(/usr/lib/libDrakX); use common qw(:common :functional); use diskdrake; use interactive_gtk; @@ -62,7 +62,7 @@ my $hds = I'll try to go on blanking bad partitions"), $err]); }; -$SIG{__DIE__} = sub { chomp $_[0]; log::l("ERROR: $_[0]") }; +$SIG{__DIE__} = sub { chomp (my $m = $_[0]); log::l("ERROR: $m") }; my $fstab = [ fsedit::get_fstab(@$hds) ]; fs::get_mntpoints_from_fstab($fstab); diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot new file mode 100755 index 000000000..33af4079a --- /dev/null +++ b/perl-install/standalone/drakboot @@ -0,0 +1,42 @@ +#!/usr/bin/perl + +use lib qw(/usr/lib/libDrakX); + +use common qw(:system :file :functional); +use interactive; +use any; +use lilo; +use detect_devices; +use fsedit; +use c; + +local $_ = join '', @ARGV; + +/-h/ and die "usage: drakboot\n"; + +$::isStandalone = 1; + +my $in = vnew interactive('su'); + +my $bootloader = lilo::read('', '/etc/lilo.conf'); + +my $hds = catch_cdie { fsedit::hds([ detect_devices::hds() ], {}) } sub { 1 }; +my $fstab = [ fsedit::get_fstab(@$hds) ]; +fs::get_mntpoints_from_fstab($fstab); + +ask: +any::setupBootloader($in, $bootloader, $hds, $fstab, $ENV{SECURE_LEVEL}) or $in->exit(0); + +eval { lilo::install('', $bootloader) }; +my $err = $@; +eval { lilo::install_grub('', $bootloader, $fstab, $hds) }; + +if ($err && $@) { + $in->ask_warn('', + [ _("Installation of LILO failed. The following error occured:"), + grep { !/^Warning:/ } cat_("/tmp/.error") ]); + unlink "/tmp/.error"; + goto ask; +} + +$in->exit(0); diff --git a/perl-install/standalone/drakxconf b/perl-install/standalone/drakxconf index 8699b05a2..e4e4e9bd3 100755 --- a/perl-install/standalone/drakxconf +++ b/perl-install/standalone/drakxconf @@ -11,7 +11,7 @@ use c; local $_ = join '', @ARGV; -/-h/ and die "usage: draxconf\n"; +/-h/ and die "usage: drakxconf\n"; $::isStandalone = 1; @@ -20,7 +20,7 @@ my $in = vnew interactive('su'); my $choice = $in->ask_from_list("drakxconf", _("Choose the tool you want to use"), [ grep { my $prog = $_; int grep { -x "$_/$prog" } split ":", $ENV{PATH} } - qw(XFdrake adduserdrake diskdrake drakxservices keyboarddrake mousedrake netdrake printerdrake draksec) ]) or c::_exit(0); #- workaround for perl-GTK + qw(XFdrake adduserdrake diskdrake drakxservices keyboarddrake mousedrake netdrake printerdrake draksec drakboot) ]) or c::_exit(0); #- workaround for perl-GTK $in->end; -- cgit v1.2.1