summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drakpxelinux.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl
index 5a5d1f5..1eb454f 100644
--- a/drakpxelinux.pl
+++ b/drakpxelinux.pl
@@ -515,7 +515,12 @@ sub edit_box_item {
} 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");
+ my $auto_cfg = $network::pxe::pxelinux_client_root . "/pxelinux.cfg/profiles/auto_" . $profile . "_" . $label . ".pl";
+ cp_af($file, $auto_cfg);
+ substInFile {
+ s/^.*deploy_server.*\n//g;
+ $_ .= "\$o->{deploy_server} = \"$ip_address:3710\";\n" if eof;
+ } $auto_cfg;
$data->set_text("http://$ip_address:3712/auto_" . $profile . "_" . $label . ".pl");
}
$fd->hide;