INN commit: trunk/frontends (mailpost.in)
INN Commit
rra at isc.org
Thu Apr 2 18:42:41 UTC 2015
Date: Thursday, April 2, 2015 @ 11:42:40
Author: iulius
Revision: 9816
Use Sys::Hostname Perl core module instead of calling /bin/hostname
Modified:
trunk/frontends/mailpost.in
-------------+
mailpost.in | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Modified: mailpost.in
===================================================================
--- mailpost.in 2015-03-25 20:26:58 UTC (rev 9815)
+++ mailpost.in 2015-04-02 18:42:40 UTC (rev 9816)
@@ -18,6 +18,7 @@
use IPC::Open3;
use IO::Select;
use POSIX qw(setsid);
+use Sys::Hostname;
use INN::Utils::Shlock;
use strict;
@@ -69,7 +70,7 @@
my $Database = ($opt_b || $INN::Config::pathtmp) . "/mailpost-msgid" ;
my $Maintainer = $INN::Config::newsmaster || "usenet" ;
my $WhereTo = $opt_o || $Submit ;
-my $Mailname = $INN::Config::fromhost ;
+my $Mailname = $INN::Config::fromhost || hostname ;
# Can't use $INN::Config::pathtmp as we're usually not running as news.
my $Tmpdir = "/var/tmp" ;
@@ -79,9 +80,6 @@
$WhereTo = "cat" ;
}
-chop ($Mailname = `/bin/hostname`) if ! $Mailname ;
-
-
#
# Our command-line argument(s) are the list of newsgroups to post to.
#
More information about the inn-committers
mailing list