summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b6dd578)
raw | patch | inline | side by side (parent: b6dd578)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Aug 2010 13:19:37 +0000 (13:19 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 24 Aug 2010 13:19:37 +0000 (13:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19435 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index 56200d9964557078bc8530c094f7acf8de4b250f..003d30f72e8df25d504a25bae93fb516b4348e46 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
}
# Check if our ip is resolvable - if not: don't try to register
- my $ip= &get_local_ip_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/));
+ my $ip= defined($client_ip)?$client_ip:&get_local_ip_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/));
my $dnsname= gethostbyaddr(inet_aton($ip), AF_INET);
if(!defined($dnsname)) {
if( defined($client_force_hostname) && $client_force_hostname eq "true") {
}
# create registration msg
- my $local_ip = &get_local_ip_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/));
+ my $local_ip = (defined($client_ip))?$client_ip:&get_local_ip_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/));
my $local_mac = &get_local_mac_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/));
my $register_hash = &create_xml_hash("here_i_am", $local_ip.":".$client_port, $server);
&add_content2xml_hash($register_hash, "new_passwd", $server_key);
$try_to_register = 0;
# Set fixed client address and mac address
- $client_ip= &get_local_ip_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/));
+ $client_ip= (defined($client_ip))?$client_ip:&get_local_ip_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/));
$client_address= "$client_ip:$client_port";
$client_mac_address = $local_mac;
$client_dnsname = $dnsname;