summaryrefslogtreecommitdiffstats
path: root/CVSROOT/cfg.pm
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2001-09-07 16:27:32 +0000
committerjoe <joe@FreeBSD.org>2001-09-07 16:27:32 +0000
commit66f05511a5959929a1782c7837f4694caa6eea60 (patch)
tree5bc13dc21696a00e2f24b9f6e40ff2a193f878ae /CVSROOT/cfg.pm
parent61b82b653c665b91f7a9c7166c5766554721f11d (diff)
downloadFreeBSD-ports-66f05511a5959929a1782c7837f4694caa6eea60.zip
FreeBSD-ports-66f05511a5959929a1782c7837f4694caa6eea60.tar.gz
Replace Sys::Hostname::hostname with a direct call to /bin/hostname,
to work around an annoying bug in the former that caused a warning when using CORE::system() later on.
Diffstat (limited to 'CVSROOT/cfg.pm')
-rwxr-xr-xCVSROOT/cfg.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/CVSROOT/cfg.pm b/CVSROOT/cfg.pm
index 0ffc67e..7100779 100755
--- a/CVSROOT/cfg.pm
+++ b/CVSROOT/cfg.pm
@@ -99,8 +99,10 @@ $MAIL_ON_DIR_CREATION = 0;
# Remember to comment out if using for other purposes.
##############################################################
##############################################################
-use Sys::Hostname; # get hostname() function
-if (hostname() =~ /^(freefall|internat)\.freebsd\.org$/i) {
+my $hostname = `/bin/hostname`;
+die "Can't determine hostname!\n" if $? >> 8;
+chomp $hostname;
+if ($hostname =~ /^(freefall|internat)\.freebsd\.org$/i) {
my $meister;
$MAILADDRS='cvs-committers@FreeBSD.org cvs-all@FreeBSD.org';
OpenPOWER on IntegriCloud