summaryrefslogtreecommitdiffstats
path: root/CVSROOT
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-11-02 07:33:22 +0000
committerpeter <peter@FreeBSD.org>1995-11-02 07:33:22 +0000
commit06061b2758d4e97ea566782a6fe85f556dd7eb6f (patch)
tree904412c9a26306dea4df71d85d7658eec1b108cf /CVSROOT
parente83bec21335ba45a92663de0aeed7564b0ca7309 (diff)
downloadFreeBSD-ports-06061b2758d4e97ea566782a6fe85f556dd7eb6f.zip
FreeBSD-ports-06061b2758d4e97ea566782a6fe85f556dd7eb6f.tar.gz
Have another crack at getting the login name. Try `logname` - it seems
that the mail process always gets it right and that's a subshell of the perl script log_accum.pl, so it's worth giving this a go.
Diffstat (limited to 'CVSROOT')
-rwxr-xr-xCVSROOT/log_accum.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/CVSROOT/log_accum.pl b/CVSROOT/log_accum.pl
index 6d1a93c..45b8439 100755
--- a/CVSROOT/log_accum.pl
+++ b/CVSROOT/log_accum.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
#
-# $Id: log_accum.pl,v 1.9 1995/10/31 20:05:12 peter Exp $
+# $Id: log_accum.pl,v 1.10 1995/10/31 23:17:11 peter Exp $
#
# Perl filter to handle the log messages from the checkin of files in
# a directory. This script will group the lists of files by log
@@ -162,8 +162,6 @@ sub build_header {
delete $ENV{'TZ'};
local($sec,$min,$hour,$mday,$mon,$year) = localtime(time);
$version = '';
- #$login = getlogin || (getpwuid($<))[0] || die("Unknown user $<.\n");
- $login = (getpwuid($<))[0] || die("Unknown user $<.\n");
$header = sprintf("%-8s %s %02d/%02d/%02d %02d:%02d:%02d",
$login, $version, $year%100, $mon+1, $mday,
$hour, $min, $sec);
@@ -281,6 +279,8 @@ sub mail_notification {
#
$id = getpgrp();
$state = $STATE_NONE;
+$login = `logname` || (getpwuid($<))[0] || die("Unknown user $<.\n");
+chop($login);
@files = split(' ', $ARGV[0]);
@path = split('/', $files[0]);
$repository = @path[0];
OpenPOWER on IntegriCloud