summaryrefslogtreecommitdiffstats
path: root/drakpxelinux.pl
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-09-14 15:55:31 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-09-14 15:55:31 +0000
commit35478e4bc0c788902f802e65ee7dfd09d10b58a6 (patch)
tree488c37194c852c33a781ba0c7785a2cd4b3936d6 /drakpxelinux.pl
parent9eb87268a12b0e794de5fea8f61b5c60fabac28f (diff)
downloaddrakpxelinux-35478e4bc0c788902f802e65ee7dfd09d10b58a6.tar
drakpxelinux-35478e4bc0c788902f802e65ee7dfd09d10b58a6.tar.gz
drakpxelinux-35478e4bc0c788902f802e65ee7dfd09d10b58a6.tar.bz2
drakpxelinux-35478e4bc0c788902f802e65ee7dfd09d10b58a6.tar.xz
drakpxelinux-35478e4bc0c788902f802e65ee7dfd09d10b58a6.zip
- auto_install: test perl script
- catch USR1 signal to update systems tab
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r--drakpxelinux.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl
index 7733118..5a5d1f5 100644
--- a/drakpxelinux.pl
+++ b/drakpxelinux.pl
@@ -483,7 +483,10 @@ sub edit_box_item {
# create file dialog widget, with file or directory selection
my $fdwidget = sub {
my ($data, $test, $filetotest, $label, $profile) = @_;
- chdir($network::pxe::pxelinux_client_root);
+ if ($filetotest eq "auto_install") {
+ chdir($network::pxe::pxelinux_client_root . "/pxelinux.cfg/profiles/");
+ } else { chdir($network::pxe::pxelinux_client_root);
+ }
my $fd = new Gtk2::FileSelection(N("Selection"));
$fd->set_modal(1);
$fd->signal_connect("destroy", sub { $fd->hide });
@@ -510,6 +513,7 @@ sub edit_box_item {
$data->set_text("images/$label.img");
}
} elsif ($filetotest eq "auto_install") {
+ run_program::get_stdout("file $file") =~ /perl/ or err_dialog(N("Error!"), N("Should be a perl script")) and \return;
my $ip_address = network::tools::get_interface_ip_address($net, $interface);
run_program::get_stdout("cp -avf $file " . $network::pxe::pxelinux_client_root . "/pxelinux.cfg/profiles/auto_" . $profile . "_" . $label . ".pl");
$data->set_text("http://$ip_address:3712/auto_" . $profile . "_" . $label . ".pl");
@@ -1253,6 +1257,9 @@ add_local_profil_entry();
add_configured_mac_addresses();
get_mac_addresses_from_dhcp_log();
update_systems_data_from_file();
+$SIG{USR1} = sub {
+ update_systems_data_from_file();
+};
Glib::Timeout->add(60000, \&get_mac_addresses_from_dhcp_log);
refresh_profiles();
$w->show;