summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-08-31 16:40:33 +0000
committerOlivier Blin <oblin@mandriva.org>2005-08-31 16:40:33 +0000
commit1fc52ee53fcbe5917db530a057ddf9d052e2a672 (patch)
treeba61d7365fc43b22433a68055c52316301319a38 /perl-install/install_any.pm
parent2ddf5679400aa56e9ee4b0f2e92f1313daffc7eb (diff)
downloaddrakx-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.pm25
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
#-###############################################################################