summaryrefslogtreecommitdiffstats
path: root/pxe_wizard/Pxe.pm
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-01-22 10:22:24 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-01-22 10:22:24 +0000
commit7c14bb0fed100ee3ff36714aa0e3bb1299257149 (patch)
treea0c7dd9984e5d481dbdb57313e9e749e9467e533 /pxe_wizard/Pxe.pm
parent5d26e277b2d6bf0d70f5842bce3878897db3441c (diff)
downloaddrakwizard-7c14bb0fed100ee3ff36714aa0e3bb1299257149.tar
drakwizard-7c14bb0fed100ee3ff36714aa0e3bb1299257149.tar.gz
drakwizard-7c14bb0fed100ee3ff36714aa0e3bb1299257149.tar.bz2
drakwizard-7c14bb0fed100ee3ff36714aa0e3bb1299257149.tar.xz
drakwizard-7c14bb0fed100ee3ff36714aa0e3bb1299257149.zip
fix problem of list image
Diffstat (limited to 'pxe_wizard/Pxe.pm')
-rw-r--r--pxe_wizard/Pxe.pm28
1 files changed, 17 insertions, 11 deletions
diff --git a/pxe_wizard/Pxe.pm b/pxe_wizard/Pxe.pm
index f575e7d6..a5a64e2c 100644
--- a/pxe_wizard/Pxe.pm
+++ b/pxe_wizard/Pxe.pm
@@ -109,6 +109,7 @@ $o->{pages} = {
},
post => sub {
-f "$X86/drakwizard_pxe" or return 'error_needpxe';
+ @list_menu or return 'addimg';
if ($o->{var}{wiz_level} == 2) {
return 'addimg' }
elsif ($o->{var}{wiz_level} == 3) {
@@ -129,7 +130,7 @@ $o->{pages} = {
{ label => "PXE description:", val => \$o->{var}{DESCR} },
{ label => "Full path to boot image:", val => \$o->{var}{IMG} },
],
-
+ post => \&test_data,
next => 'summaryadd',
},
removeimg => {
@@ -141,6 +142,7 @@ $o->{pages} = {
},
modifyimg => {
name => N("Add option to boot image:") . "\n\n" . N("Please choose PXE boot image to modify"),
+
data => [
{ label => N("Boot image to configure:"), val => \$o->{var}{IMGTOMODIFY}, fixed_list => \@list_menu },
],
@@ -234,11 +236,25 @@ $o->{pages} = {
endadd => {
name => N("Congratulations"),
data => [ { label => N("The wizard successfully add a PXE boot image.") } ],
+ post => sub {
+ @list_menu =();
+ foreach (cat_($PXEDEFAULT)) {
+ my ($ent) = /# TAG: (\w+)_BEGIN/;
+ ! $ent or push @list_menu,$ent;
+ }
+ },
next => 'welcome',
},
endremove => {
name => N("Congratulations"),
data => [ { label => N("The wizard successfully remove a PXE boot image.") } ],
+ post => sub {
+ @list_menu =();
+ foreach (cat_($PXEDEFAULT)) {
+ my ($ent) = /# TAG: (\w+)_BEGIN/;
+ ! $ent or push @list_menu,$ent;
+ }
+ },
next => 'welcome',
},
endmodify => {
@@ -334,16 +350,6 @@ sub remove_in_menu {
output($PXEDEFAULT, $begin, $end);
}
-# get list of available PXE boot images
-sub list_menu {
- my @list_menu;
- foreach (cat_($PXEDEFAULT)) {
- my ($ent) = /# TAG: (\w+)_BEGIN/;
- ! $ent or push @list_menu,$ent; #print "$ent\n";
- }
- @list_menu;
-}
-
# remove entry in help.txt
sub remove_in_help {
my ($NAME) = @_;