From cf3124970383ed0334e91a63af37565fa634b11e Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 20 Mar 2007 00:47:54 +0000 Subject: [PATCH] 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 --- src/perlmods/OpenSRF/Utils/Config.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.11.0