diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-08-31 16:40:33 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-08-31 16:40:33 +0000 |
commit | 1fc52ee53fcbe5917db530a057ddf9d052e2a672 (patch) | |
tree | ba61d7365fc43b22433a68055c52316301319a38 /perl-install/install_any.pm | |
parent | 2ddf5679400aa56e9ee4b0f2e92f1313daffc7eb (diff) | |
download | drakx-1fc52ee53fcbe5917db530a057ddf9d052e2a672.tar drakx-1fc52ee53fcbe5917db530a057ddf9d052e2a672.tar.gz drakx-1fc52ee53fcbe5917db530a057ddf9d052e2a672.tar.bz2 drakx-1fc52ee53fcbe5917db530a057ddf9d052e2a672.tar.xz drakx-1fc52ee53fcbe5917db530a057ddf9d052e2a672.zip |
initial deployment server support
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 25 |
1 files changed, 25 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 #-############################################################################### |