summaryrefslogtreecommitdiff
path: root/mcon/U/cf_who.U
diff options
context:
space:
mode:
Diffstat (limited to 'mcon/U/cf_who.U')
-rw-r--r--mcon/U/cf_who.U15
1 files changed, 9 insertions, 6 deletions
diff --git a/mcon/U/cf_who.U b/mcon/U/cf_who.U
index 0285312..d7492c7 100644
--- a/mcon/U/cf_who.U
+++ b/mcon/U/cf_who.U
@@ -1,7 +1,7 @@
-?RCS: $Id: cf_who.U 167 2013-05-08 17:58:00Z rmanfredi $
+?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
-?RCS:
+?RCS:
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
@@ -47,16 +47,19 @@ cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
?X: cf_by=`( (logname) 2>/dev/null || whoami) 2>&1`
?X: Switch to emergency mode... -- RAM, 19/04/94
?X:
-?X: Parens needed to avoid error message if the program does not exist.
+?X: Parentheses needed to avoid error message if the program does not exist.
?X: Uses case instead of $test so it can be put before $test is defined.
?X: Don't redirect to a file because on Ultrix (under script?) logname
?X: outputs a blank line first. This method will apparently work.
-cf_by=`(logname) 2>/dev/null`
case "$cf_by" in
"")
- cf_by=`(whoami) 2>/dev/null`
+ cf_by=`(logname) 2>/dev/null`
case "$cf_by" in
- "") cf_by=unknown ;;
+ "")
+ cf_by=`(whoami) 2>/dev/null`
+ case "$cf_by" in
+ "") cf_by=unknown ;;
+ esac ;;
esac ;;
esac