summaryrefslogtreecommitdiffstats
path: root/pxe_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'pxe_wizard')
-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) = @_;