From 9f98f7d7cbde11a47b5f31c274cb0e22e776b891 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Fri, 8 Feb 2008 12:33:02 +0000 Subject: [PATCH] only do an DNS lookup if no server specified git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8779 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-client | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 2977f620f..a56d54891 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -1129,19 +1129,26 @@ $xml = new XML::Simple(); $default_server_key = $server_key; -# find all possible gosa-si-servers in DNS -if (defined $server_domain) { +# add gosa-si-server address from config file at first position of server list +if (defined $server_address) { + unshift(@servers, $server_address); + my $servers_string = join(", ", @servers); + daemon_log("found servers in configuration file: $servers_string", 5); +} +else { + if ( !$server_domain) { + daemon_log("ERROR: please specify a gosa-si-server address or a domain in config file", 1); + exit( 1 ); + } my @tmp_servers = &get_server_addresses($server_domain); foreach my $server (@tmp_servers) { unshift(@servers, $server); } + my $servers_string = join(", ", @servers); + daemon_log("found servers in DNS: $servers_string", 5); } -# add gosa-si-server address from config file at first position of server list -if (defined $server_address) { - unshift(@servers, $server_address); -} -my $servers_string = join(", ", @servers); -daemon_log("found servers in configuration file and via DNS: $servers_string", 5); + + POE::Session->create( -- 2.30.2