diff options
author | Antoine Ginies <aginies@mandriva.com> | 2004-08-06 10:07:06 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2004-08-06 10:07:06 +0000 |
commit | 5daa6351f4e3d9730056b4f7f07acd5025d39c5a (patch) | |
tree | 570b00b70d4af44a0d6f2209a1cadac0af78e98b /drakpxelinux.pl | |
parent | ab96b009ae38a6d730799846fabf99c2f3cb5683 (diff) | |
download | drakpxelinux-5daa6351f4e3d9730056b4f7f07acd5025d39c5a.tar drakpxelinux-5daa6351f4e3d9730056b4f7f07acd5025d39c5a.tar.gz drakpxelinux-5daa6351f4e3d9730056b4f7f07acd5025d39c5a.tar.bz2 drakpxelinux-5daa6351f4e3d9730056b4f7f07acd5025d39c5a.tar.xz drakpxelinux-5daa6351f4e3d9730056b4f7f07acd5025d39c5a.zip |
- remove kernel/initrd in remove mode
- default options are blank in add image
- add a test in file selection
- readjust info in wizard
- add a wait message in wizard
- add info in edit box
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r-- | drakpxelinux.pl | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl index a2e3186..9d8e51b 100644 --- a/drakpxelinux.pl +++ b/drakpxelinux.pl @@ -275,16 +275,16 @@ sub wizard_add_entry { name => N("Add PXE entry"), pages => { welcome => { - name => N("Add an all.rdz boot image"), + name => N("Add an all.rdz boot image") . N("To boot through network, network computer need a boot image. Morever we need to name this image, so each boot image is related to a name in PXE menu. So user can choose wich image he wants to boot through PXE.") . "\n\n" . N("For technical reason, in case of multiple boot image, it's more simple to boot network computer through a kernel (vmlinuz), and provide one file with all drivers needed (in our case all.rdz).") , next => 'addimg', }, addimg => { - name => N("To boot through network, network computer need a boot image. Morever we need to name this image, so each boot image is related to a name in PXE menu. So user can choose wich image he wants to boot through PXE.") . "\n\n" . N("PXE description is used to explain the rule of the boot image, ie: Mandrake 10 image, Mandrake cooker image..") . N("For technical reason, in case of multiple boot image, it's more simple to boot network computer through a kernel (vmlinuz), and provide one file with all drivers needed (in our case all.rdz).") . "\n\n" . N("Path to all.rdz: provide the full path to all.rdz image") . "\n\n" . N("PXE name: the name displayed in PXE menu (please provide a word or a number, with no space)"), + name => N("PXE information is used to explain the rule of the boot image, ie: Mandrake 10 image, Mandrake cooker image..") . "\n\n" . N("Path to all.rdz: provide the full path to all.rdz image source") . "\n\n" . N("PXE label: the name displayed in PXE menu (please provide a word or a number, with no space)") . "\n\n" . N("At the end of this wizard, the all.rdz image and kernel vmlinuz will be copied into \n$IMGPATH"), data => [ { label => "PXE label:", val => \$WPXENAME }, - { label => "PXE description:", val => \$WINFO }, - { label => "Full path to all.rdz image:", val => \$WALLRDZ }, - { label => "Full path to vmlinuz:", val => \$WVMLINUZ}, + { label => "PXE information:", val => \$WINFO }, + { label => "Full path to all.rdz image source:", val => \$WALLRDZ }, + { label => "Full path to vmlinuz source:", val => \$WVMLINUZ}, ], complete => sub { if (any { /^$WPXENAME :/ } cat_($PXEHELP)) { @@ -296,24 +296,25 @@ sub wizard_add_entry { }, next => 'endadd', post => sub { + my $w = $in->wait_message(N("add a PXE entry"), N("ad a PXE entry in your PXE server configuration...")); add_in_help($WPXENAME, $WINFO); my $vmlinuzpxe = basename($WVMLINUZ) . "-$WPXENAME"; - cp_af($WVMLINUZ, "$IMGPATH/" . $vmlinuzpxe); #basename($WVMLINUZ) . "-$WPXENAME"); + cp_af($WVMLINUZ, "$IMGPATH/$vmlinuzpxe"); cp_af($WALLRDZ, "$IMGPATH/$WPXENAME.rdz"); push @listpxe, { label => $WPXENAME, info => $WINFO, - kernel => "/images/$vmlinuzpxe", + kernel => "images/$vmlinuzpxe", initrd => "images/$WPXENAME.rdz", - automatic => "http", - interface => "eth0", - network => "dhcp", - server => "10.0.1.33", - directory => "/install/cooker", - ramdisk => "64000", - vga => "788", - display => ":0", - option => "acpi=ht", + automatic => "", + interface => "", + network => "", + server => "", + directory => "", + ramdisk => "128000", + vga => "", + display => "", + option => "", }; my $iter = $model->append; $model->set($iter, @@ -332,6 +333,7 @@ sub wizard_add_entry { COLUMN_OPTION, $listpxe[-1]{option}, ); write_conf_pxe(); + undef $w; return; }, no_back => 1, @@ -363,6 +365,12 @@ sub remove_item { $model->remove($iter); splice @listpxe, $i, 1; remove_in_help($listpxe[$i]{label}); + if (basename($listpxe[$i]{kernel} ne "memdisk")) { + rm_rf($listpxe[$i]{kernel}); + rm_rf($listpxe[$i]{initrd}); + } else { + rm_rf($listpxe[$i]{initrd}); + } write_conf_pxe; } } @@ -408,6 +416,8 @@ sub edit_box_item { $file_dialogk->signal_connect("destroy", sub { $file_dialogk->hide }); $file_dialogk->ok_button->signal_connect(clicked => sub { my $file = $file_dialogk->get_filename; + -f $file or err_dialog(N("Error !"), "Should be a file") and return; + $file = "images/" . basename($file); $kernel->set_text($file); $file_dialogk->hide; }, $file_dialogk); @@ -424,6 +434,8 @@ sub edit_box_item { $file_dialog->signal_connect("destroy", sub { $file_dialog->hide }); $file_dialog->ok_button->signal_connect(clicked => sub { my $filei = $file_dialog->get_filename; + -f $filei or err_dialog(N("Error !"), "Should be a file") and return; + $filei = "images/" . basename($filei); $initrd->set_text($filei); $file_dialog->hide; }, $file_dialog); @@ -483,6 +495,7 @@ sub edit_box_item { ), 0, gtkadd(Gtk2::Frame->new(N("Boot image")), gtkpack_(gtkset_border_width(Gtk2::VBox->new, 3), + 0, Gtk2::Label->new("Path are relative to $X86"), 0, $label_and_widgets->(N("Kernel"), $kernel, $buttonkernel), 0, $label_and_widgets->(N("Initrd"), $initrd, $buttoninitrd), ), |