diff options
-rw-r--r-- | perl-install/install_any.pm | 25 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index b5e6d7526..ca1f00a2e 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -1930,6 +1930,31 @@ sub move_clp_to_disk { } } +sub deploy_server_notify { + my ($o) = @_; + my $fallback_intf = "eth0"; + my $fallback_port = 3710; + + my ($server, $port) = $o->{deploy_server} =~ /^(.*?)(?::(\d+))?$/; + if ($server) { + require network::tools; + require IO::Socket; + $port ||= $fallback_port; + my $intf = network::tools::get_current_gateway_interface() || $fallback_intf; + my $mac = c::get_hw_address($intf); + my $sock = IO::Socket::INET->new(PeerAddr => $server, PeerPort => $port, Proto => 'tcp'); + if ($sock) { + print $sock "$mac\n"; + close($sock); + log::l(qq(successfully notified deploy server $server on port $port)); + } else { + log::l(qq(unable to contact deploy server $server on port $port)); + } + } else { + log::l(qq(unable to parse deploy server in string $o->{deploy_server})); + } +} + #-############################################################################### #- pcmcia various #-############################################################################### diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 606df646e..dc102aa52 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -946,6 +946,7 @@ Beware that some Mandriva Linux tools rely on the contents of some of these files... so remove any file from here at your own risk! " }; + install_any::deploy_server_notify($o) if exists $o->{deploy_server}; #- wait for remaining processes. foreach (@{$o->{waitpids}}) { waitpid $_, 0; |