From: miker Date: Tue, 20 Mar 2007 00:47:54 +0000 (+0000) Subject: using Net::Domain instead of the shell to get the fqdn of the current host X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cf3124970383ed0334e91a63af37565fa634b11e;p=opensrf%2Fbjwebb.git using Net::Domain instead of the shell to get the fqdn of the current host git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@844 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/Utils/Config.pm b/src/perlmods/OpenSRF/Utils/Config.pm index 434ceb5..b18bf15 100755 --- a/src/perlmods/OpenSRF/Utils/Config.pm +++ b/src/perlmods/OpenSRF/Utils/Config.pm @@ -6,6 +6,7 @@ use vars qw/@ISA $AUTOLOAD $VERSION/; push @ISA, qw/OpenSRF::Utils/; use OpenSRF::Utils (':common'); +use Net::Domain qw/hostfqdn/; $VERSION = do { my @r=(q$Revision$=~/\d+/g); sprintf "%d."."%02d"x$#r,@r }; @@ -325,7 +326,7 @@ sub FILE { sub load_env { my $self = shift; - my $host = `hostname -f` || `uname -n`; + my $host = hostfqdn(); chomp $host; $$self{env} = $self->section_pkg->new; $$self{env}{hostname} = $host;