Author: rhafer Date: Tue Mar 2 15:57:50 2010 New Revision: 61099 URL: http://svn.opensuse.org/viewcvs/yast?rev=61099&view=rev Log: bnc#583786, use Hostname Module to get the machine's domainname (for falling back to /etc/HOSTNAME, when the hostname doesn't resolve correctly) Modified: branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm Modified: branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/ldap-s... ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm (original) +++ branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm Tue Mar 2 15:57:50 2010 @@ -31,6 +31,7 @@ YaST::YCP::Import ("SuSEFirewall"); YaST::YCP::Import ("Service"); YaST::YCP::Import ("SCR"); +YaST::YCP::Import ("Hostname"); my %error = ( msg => undef, details => undef ); my $ssl_check_command = "/usr/lib/YaST2/bin/ldap-server-ssl-check"; @@ -1621,8 +1622,12 @@ my $domain = $rc->{"stdout"}; if ( $domain eq "" ) { - y2milestone(""hostname -d" returned: "". $rc->{'stderr'} . "" falling back to default"); - $domain = "site"; + $domain = Hostname::CurrentDomain(); + if ( $domain eq "" ) + { + y2milestone("unable to determine domainname falling back to hard-coded default"); + $domain = "site"; + } } chomp($domain); y2milestone( "domain is: <".$domain.">" ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org