summaryrefslogtreecommitdiffstats
path: root/pxe_wizard/Pxe.pm
diff options
context:
space:
mode:
Diffstat (limited to 'pxe_wizard/Pxe.pm')
-rw-r--r--pxe_wizard/Pxe.pm20
1 files changed, 14 insertions, 6 deletions
diff --git a/pxe_wizard/Pxe.pm b/pxe_wizard/Pxe.pm
index 67ad1bdf..e0a71ea5 100644
--- a/pxe_wizard/Pxe.pm
+++ b/pxe_wizard/Pxe.pm
@@ -51,7 +51,7 @@ my $XINETDDIR = "/etc/xinetd.d";
my $o = {
name => N("PXE Wizard (devel)"),
var => {
- IMG => '/tmp/t.img',
+ IMG => '/var/install/92/images/network.img',
PXENAME => '92',
DESCR => 'install 9.2',
IMGTOREMOVE => '',
@@ -65,8 +65,13 @@ my %level = (
3 => N("remove - remove image in PXE"),
# 4 => N("Modify - Modify image in PXE"),
);
-# to get menu entry
-list_menu();
+
+# to get list menu entry
+my @list_menu;
+foreach (cat_($PXEDEFAULT)) {
+ my ($ent) = /# TAG: (\w+)_BEGIN/;
+ ! $ent or push @list_menu,$ent;
+}
$o->{pages} = {
welcome => {
@@ -102,7 +107,7 @@ $o->{pages} = {
removeimg => {
name => N("Remove a boot Image") . "\n\n" . N("Which one ?"),
data => [
- { label => N("Which one:"), val => \$o->{var}{IMGTOREMOVE} },
+ { label => N("Which one:"), val => \$o->{var}{IMGTOREMOVE}, fixed_list => \@list_menu },
],
next => 'summaryremove',
},
@@ -274,16 +279,18 @@ sub remove_in_menu {
}
sub list_menu {
+ my @list_menu;
foreach (cat_($PXEDEFAULT)) {
my ($ent) = /\# TAG: (\w+)_BEGIN/;
- ! $ent or print "$ent\n";
+ ! $ent or push @list_menu,$ent; #print "$ent\n";
}
+ @list_menu;
}
sub remove_in_help {
my ($NAME) = @_;
substInFile {
- s/^$NAME :.*//x;
+ s/^$NAME\s:.*//x;
} $PXEHELP;
}
@@ -354,6 +361,7 @@ sub do_it_pxe {
return if $::testing;
my $in = 'interactive'->vnew('su', 'PXE server');
my $w = $in->wait_message(N("PXE server"), N("Configuring PXE server on your system..."));
+ mkdir_p($IMGPATH);
memlinux_prep();
default_pxe_menu();
default_pxe_messages();