From: rettenbe Date: Fri, 8 Feb 2008 12:33:02 +0000 (+0000) Subject: only do an DNS lookup if no server specified X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f98f7d7cbde11a47b5f31c274cb0e22e776b891;p=gosa.git 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 --- 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(