summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3258eb5)
raw | patch | inline | side by side (parent: 3258eb5)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Feb 2008 13:54:42 +0000 (13:54 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Feb 2008 13:54:42 +0000 (13:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8864 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 63567e52a06ff56b44e192d3d695ce6ea8bfb1c2..27bf2f145419acfb16b658f48555d64d1c324c8c 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
my $ip= &get_local_ip_for_remote_ip(sprintf("%s", $server =~ /^([0-9\.]*?):.*$/));
my $resolver= Net::DNS::Resolver->new;
my $dnsresult= $resolver->search($ip);
+ my $dnsname="";
if(!defined($dnsresult)) {
&write_to_file("goto-dns-error:Could not resolve hostname for ip $ip", $fai_logpath);
exit(1);
+ } else {
+ $dnsname=$dnsresult->{answer}[0]->{ptrdname};
}
# create registration msg
}
my $opts_file_FH;
open($opts_file_FH, ">$opts_file");
- print $opts_file_FH "MAC=\"$local_mac\"";
+ print $opts_file_FH "MAC=\"$local_mac\"\n";
+ print $opts_file_FH "IPADDRESS=\"$client_ip\"\n";
+ print $opts_file_FH "HOSTNAME=\"$dnsname\"\n";
close($opts_file_FH);
last;
} else {