From adb604e49b09fe1dcdea27f09ceb887b3c3f5a0f Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 14 Sep 2005 16:09:45 +0000 Subject: set $o->{deploy_server} in auto_inst file --- drakpxelinux.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drakpxelinux.pl') 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; -- cgit v1.2.1