summaryrefslogtreecommitdiffstats
path: root/drakpxelinux.pl
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-09-14 12:42:56 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-09-14 12:42:56 +0000
commitc2fa9a48fe89486248fb8b5e78d412ff2a027623 (patch)
treed522e50f4fb8cc920cdfbe6b4fd71f2929e38429 /drakpxelinux.pl
parentb15761eb810ee58264d3cef5d458901e64a456b4 (diff)
downloaddrakpxelinux-c2fa9a48fe89486248fb8b5e78d412ff2a027623.tar
drakpxelinux-c2fa9a48fe89486248fb8b5e78d412ff2a027623.tar.gz
drakpxelinux-c2fa9a48fe89486248fb8b5e78d412ff2a027623.tar.bz2
drakpxelinux-c2fa9a48fe89486248fb8b5e78d412ff2a027623.tar.xz
drakpxelinux-c2fa9a48fe89486248fb8b5e78d412ff2a027623.zip
- remove PXE entry doesn't remove kernel and initrd
- use auto_install instead of kickstart option - re-enable local boot in default profil
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r--drakpxelinux.pl32
1 files changed, 20 insertions, 12 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl
index 287c65e..39e356c 100644
--- a/drakpxelinux.pl
+++ b/drakpxelinux.pl
@@ -165,7 +165,7 @@ use constant COLUMN_RAMDISK => 9;
use constant COLUMN_VGA => 10;
use constant COLUMN_DISPLAY => 11;
use constant COLUMN_OPTION => 12;
-use constant COLUMN_KICKSTART => 13;
+use constant COLUMN_AUTO_INSTALL => 13;
use constant NUM_COLUMNS => 14;
my ($profile, $type);
@@ -199,7 +199,7 @@ sub update_pxelinux_conf_from_treeview {
my $iter = $model->get_iter_first;
splice @{$pxelinux_conf->{entries}};
while ($iter) {
- my ($label, $info, $kernel, $initrd, $method, $interface, $network, $server, $directory, $ramdisk, $vga, $display, $option, $kickstart) = $model->get($iter, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);
+ my ($label, $info, $kernel, $initrd, $method, $interface, $network, $server, $directory, $ramdisk, $vga, $display, $option, $auto_install) = $model->get($iter, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);
my $entry = {
label => $label,
info => $info,
@@ -214,9 +214,17 @@ sub update_pxelinux_conf_from_treeview {
vga => $network::pxe::vga_resolution_to_bios{$vga},
display => $display,
option => $option,
- kickstart => $kickstart,
+ auto_install => $auto_install,
};
- push @{$pxelinux_conf->{entries}}, $entry;
+ if ($entry->{label} eq "local") {
+ $entry = {
+ label => "local",
+ localboot => "0",
+ };
+ push @{$pxelinux_conf->{entries}}, $entry;
+ } else {
+ push @{$pxelinux_conf->{entries}}, $entry;
+ }
$iter = $model->iter_next($iter);
}
}
@@ -248,7 +256,7 @@ sub set_pxelinux_entry_at_iter {
COLUMN_VGA, $network::pxe::vga_bios_to_resolution{$entry->{vga}},
COLUMN_DISPLAY, $entry->{display},
COLUMN_OPTION, $entry->{option},
- COLUMN_KICKSTART, $entry->{kickstart},
+ COLUMN_AUTO_INSTALL, $entry->{auto_install},
);
}
@@ -390,11 +398,11 @@ sub remove_item {
if (basename($entry->{kernel} ne "memdisk")) {
print "kernel: $ke\n";
print "initrd: $initrdf\n";
- system("rm -vf $ke");
- system("rm -vf $initrdf");
+ #system("rm -vf $ke");
+ #system("rm -vf $initrdf");
} else {
print "initrd: $initrdf\n";
- system("rm -vf $initrdf");
+ #system("rm -vf $initrdf");
}
$model->remove($iter);
splice @{$pxelinux_conf->{entries}}, $i, 1;
@@ -524,8 +532,8 @@ sub edit_box_item {
$initrd->set_text($entry->{initrd});
set_help_tip($initrd, 'initrd');
- my $kickstart = Gtk2::Entry->new;
- $kickstart->set_text($entry->{kickstart});
+ my $auto_install = Gtk2::Entry->new;
+ $auto_install->set_text($entry->{auto_install});
my $file_dialog = $fdwidget->($initrd, "", "initrd", $entry->{label});
my $buttoninitrd = Gtk2::Button->new(N("Select associated initrd"));
@@ -637,7 +645,7 @@ sub edit_box_item {
2, gtkadd_widget($size_groups{button}, ""),
),
0, $label_and_widgets->(N("Remote server name"), $server, ""),
- 0, $label_and_widgets->("auto_install", $kickstart, ""),
+ 0, $label_and_widgets->("auto_install", $auto_install, ""),
0, $label_and_widgets->(N("Remote installation directory"), $directory, ""),
),
),
@@ -668,7 +676,7 @@ sub edit_box_item {
$entry->{vga} = $network::pxe::vga_resolution_to_bios{$vga->entry->get_text};
$entry->{display} = $display->get_text;
$entry->{option} = $option->get_text;
- $entry->{kickstart} = $kickstart->get_text;
+ $entry->{auto_install} = $auto_install->get_text;
# update value in cells
set_pxelinux_entry_at_iter($model, $iter, $entry);