thomas: server/kolabd/kolabd ChangeLog, 1.168, 1.169 kolab_bootstrap.in, 1.34, 1.35

cvs at kolab.org cvs at kolab.org
Thu Jun 26 18:12:02 CEST 2008


Author: thomas

Update of /kolabrepository/server/kolabd/kolabd
In directory doto:/tmp/cvs-serv31746/kolabd/kolabd

Modified Files:
	ChangeLog kolab_bootstrap.in 
Log Message:
kolab_bootstrap: Use Net::Domain to determine fqdn more reliably.


Index: ChangeLog
===================================================================
RCS file: /kolabrepository/server/kolabd/kolabd/ChangeLog,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- ChangeLog	5 Jun 2008 16:50:25 -0000	1.168
+++ ChangeLog	26 Jun 2008 16:11:59 -0000	1.169
@@ -1,3 +1,7 @@
+2008-06-26  Thomas Arendsen Hein <thomas at intevation.de>
+
+	* kolab_bootstrap.in: Use Net::Domain to determine fqdn more reliably.
+
 2008-06-05  Thomas Arendsen Hein <thomas at intevation.de>
 
 	* templates/fbview.conf.template.in: Removed unused file.

Index: kolab_bootstrap.in
===================================================================
RCS file: /kolabrepository/server/kolabd/kolabd/kolab_bootstrap.in,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- kolab_bootstrap.in	23 Feb 2008 20:19:18 -0000	1.34
+++ kolab_bootstrap.in	26 Jun 2008 16:11:59 -0000	1.35
@@ -17,12 +17,12 @@
 use Socket;
 use IO::File;
 use IO::Select;
+use Net::Domain qw(hostfqdn);
 use Net::LDAP;
 use Net::LDAP::Entry;
 use Net::Netmask;
 use File::Copy;
 use Getopt::Std;
-use Sys::Hostname;
 use Term::ReadKey;
 use Time::Local;
 use Time::localtime;
@@ -45,27 +45,6 @@
   return "\"$str\"";
 }
 
-# Try to get fqdn
-sub myhostname {
-  my $host = '';
-  # FIXME: hardcoded - maybe fixed later
-  if( open( HOSTNAME, '/etc/HOSTNAME' ) ) {
-    $host = <HOSTNAME>;
-    chomp $host;
-    close( HOSTNAME );
-  }
-  # FIXME: hardcoded - maybe fixed later
-  if( open( HOSTNAME, '/etc/hostname' ) ) {
-    $host = <HOSTNAME>;
-    chomp $host;
-    close( HOSTNAME );
-  }
-  if( $host eq '' ) {
-    $host = `hostname`;
-  }
-  return $host;
-}
-
 # Connect to host,port and return 1 on success
 sub tryConnect {
   my $host  = shift;
@@ -283,7 +262,7 @@
 }
 my $fqdn;
 if( $fqdnhostname =~ /\@\@\@/ ) {
-  $fqdn = myhostname;
+  $fqdn = hostfqdn();
 } else {
   $fqdn = $fqdnhostname;
 }





More information about the commits mailing list