summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-01-26 18:26:49 +0000
committerdamien <damien@mandriva.com>2001-01-26 18:26:49 +0000
commit548d6279ed6f8821801a8d2d3030a5335dfee8db (patch)
treeb98ab8db504f1253c53db1b408ce3bf432392b6d
parentddbd3b72040dde36c5fbe7685411167aa15cb4cb (diff)
downloaddrakx-backup-do-not-use-548d6279ed6f8821801a8d2d3030a5335dfee8db.tar
drakx-backup-do-not-use-548d6279ed6f8821801a8d2d3030a5335dfee8db.tar.gz
drakx-backup-do-not-use-548d6279ed6f8821801a8d2d3030a5335dfee8db.tar.bz2
drakx-backup-do-not-use-548d6279ed6f8821801a8d2d3030a5335dfee8db.tar.xz
drakx-backup-do-not-use-548d6279ed6f8821801a8d2d3030a5335dfee8db.zip
added embedded mode
-rwxr-xr-xperl-install/standalone/drakboot35
1 files changed, 19 insertions, 16 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index 48cbd406a..41e455a8c 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -12,6 +12,7 @@ use fsedit;
use fs;
use c;
+$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /-embedded (\S*) (\S*)/;
local $_ = join '', @ARGV;
/-h/ and die "usage: drakboot [--expert]\n";
@@ -20,25 +21,27 @@ $::expert = /-expert/;
my $in = interactive->vnew('su');
-my %l = (
- arch() !~ /sparc|alpha/ ? (
- _("Configure LILO/GRUB") => '',
- _("Create a boot floppy") => ['/usr/X11R6/bin/drakfloppy'],
- ) : (),
- _("Format floppy") => [ '/usr/bin/kfloppy', '/usr/bin/gfloppy' ],
-);
+if (!$::isEmbedded) {
+ my %l = (
+ arch() !~ /sparc|alpha/ ? (
+ _("Configure LILO/GRUB") => '',
+ _("Create a boot floppy") => ['/usr/X11R6/bin/drakfloppy'],
+ ) : (),
+ _("Format floppy") => [ '/usr/bin/kfloppy', '/usr/bin/gfloppy' ],
+ );
-while (my ($k, $v) = each %l) {
- $v or next;
- foreach (@$v) {
- -x $_ and $l{$k} = $_, last;
+ while (my ($k, $v) = each %l) {
+ $v or next;
+ foreach (@$v) {
+ -x $_ and $l{$k} = $_, last;
+ }
+ -x $l{$k} or delete $l{$k};
}
- -x $l{$k} or delete $l{$k};
-}
-if ($ENV{DISPLAY} && c::Xtest($ENV{DISPLAY})) {
- my $cmd = $l{$in->ask_from_list(_("Choice"), _("What do you want to do?"), [ keys %l ])};
- exec $cmd if $cmd;
+ if ($ENV{DISPLAY} && c::Xtest($ENV{DISPLAY})) {
+ my $cmd = $l{$in->ask_from_list(_("Choice"), _("What do you want to do?"), [ keys %l ])};
+ exec $cmd if $cmd;
+ }
}
my $bootloader = bootloader::read('', '/etc/lilo.conf');