summaryrefslogtreecommitdiffstats
path: root/pxe_wizard/Pxe.pm
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-03-09 16:35:42 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-03-09 16:35:42 +0000
commitd83d07e939d64b94568d79d4057fadc1c818c124 (patch)
treebfc85cc637774e867de73e1510ddaf69852c17c9 /pxe_wizard/Pxe.pm
parent80404e477aac1c0c23d9015c75ca873d543272ad (diff)
downloaddrakwizard-d83d07e939d64b94568d79d4057fadc1c818c124.tar
drakwizard-d83d07e939d64b94568d79d4057fadc1c818c124.tar.gz
drakwizard-d83d07e939d64b94568d79d4057fadc1c818c124.tar.bz2
drakwizard-d83d07e939d64b94568d79d4057fadc1c818c124.tar.xz
drakwizard-d83d07e939d64b94568d79d4057fadc1c818c124.zip
improve PXE menu test
Diffstat (limited to 'pxe_wizard/Pxe.pm')
-rw-r--r--pxe_wizard/Pxe.pm22
1 files changed, 11 insertions, 11 deletions
diff --git a/pxe_wizard/Pxe.pm b/pxe_wizard/Pxe.pm
index 90d17dea..4f95e37f 100644
--- a/pxe_wizard/Pxe.pm
+++ b/pxe_wizard/Pxe.pm
@@ -105,7 +105,6 @@ my @list_acpi = qw(ht force off);
my @list_apic = qw(apic noapic);
my @list_eth = qw(eth0 eth1 eth2);
-
#begin of wizard
$o->{pages} = {
welcome => {
@@ -115,15 +114,13 @@ $o->{pages} = {
$o->{var}{wiz_level} ||= 1;
},
post => sub {
- -f "$X86/drakwizard_pxe" or return 'error_needpxe';
- if ($o->{var}{wiz_level} == 2) {
- return 'addimg' }
- elsif ($o->{var}{wiz_level} == 3) {
- return 'removeimg' }
- elsif ($o->{var}{wiz_level} == 4) {
- return 'modifyimg' }
- elsif ($o->{var}{wiz_level} == 5) {
- return 'addimgrdz' }
+ if (! -f "$X86/drakwizard_pxe") { return 'pxeserver' }
+ if ($o->{var}{wiz_level} == 1) { return 'pxeserver' }
+ elsif ($o->{var}{wiz_level} == 2) { return 'addimg' }
+ elsif ($o->{var}{wiz_level} == 5) { return 'addimgrdz' }
+ @list_menu or return 'needimg';
+ if ($o->{var}{wiz_level} == 3) { return 'removeimg' }
+ elsif ($o->{var}{wiz_level} == 4) { return 'modifyimg' }
},
data => [
{ label => N("What do you want to do:"), val => \$o->{var}{wiz_level}, list => [ keys %level ], format => sub { $level{$_[0]} } },
@@ -157,6 +154,7 @@ $o->{pages} = {
data => [
{ label => N("Boot image to remove:"), val => \$o->{var}{IMGTOREMOVE}, fixed_list => \@list_menu },
],
+ no_back => 1,
next => 'summaryremove',
},
modifyimg => {
@@ -165,6 +163,7 @@ $o->{pages} = {
{ label => N("Boot image to modify:"), val => \$o->{var}{IMGTOMODIFY}, fixed_list => \@list_menu },
],
post => \&read_option,
+ no_back => 1,
next => 'gomodify',
},
gomodify => {
@@ -198,7 +197,7 @@ $o->{pages} = {
next => 'addimg',
},
needimg => {
- name => N("We need an image. Please add one."),
+ name => N("We need an all.rdz or a network.img image. Please add one."),
no_back => 1,
next => 'welcome',
post => sub {
@@ -267,6 +266,7 @@ $o->{pages} = {
data => [
{ label => N("PXE entry to remove:"), fixed_val => \$o->{var}{IMGTOREMOVE} },
],
+ no_back => 1,
post => \&do_it_remove,
next => 'endremove',
},