1 ?RCS: $Id: cf_who.U,v 3.0.1.2 1997/02/28 15:28:50 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: cf_who.U,v $
12 ?RCS: Revision 3.0.1.2 1997/02/28 15:28:50 ram
13 ?RCS: patch61: new computation method avoiding use of temporary file
15 ?RCS: Revision 3.0.1.1 1994/05/06 14:42:34 ram
16 ?RCS: patch23: login name now computed the hard way
18 ?RCS: Revision 3.0 1993/08/18 12:05:32 ram
19 ?RCS: Baseline for dist 3.0 netwide release.
22 ?X: Oldconfig dependency is there to ensure computation occurs after old values
23 ?X: from config.sh have been loaded, so that we can supersede them.
25 ?MAKE:cf_time cf_by: date Oldconfig
26 ?MAKE: -pick add $@ %<
28 ?S: Holds the output of the "date" command when the configuration file was
29 ?S: produced. This is used to tag both config.sh and config_h.SH.
32 ?S: Login name of the person who ran the Configure script and answered the
33 ?S: questions. This is used to tag both config.sh and config_h.SH.
39 : who configured the system
40 cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
42 ?X: Leave a white space between first two '(' for ksh. The sub-shell is needed
43 ?X: on some machines to avoid the error message when logname is not found; e.g.
44 ?X: on SUN-OS 3.2, (logname || whoami) would not execute whoami if logname was
47 ?X: Convex had a broken logname executable which returned a non-zero status,
48 ?X: and that broke the previous:
49 ?X: cf_by=`( (logname) 2>/dev/null || whoami) 2>&1`
50 ?X: Switch to emergency mode... -- RAM, 19/04/94
52 ?X: Parens needed to avoid error message if the program does not exist.
53 ?X: Uses case instead of $test so it can be put before $test is defined.
54 ?X: Don't redirect to a file because on Ultrix (under script?) logname
55 ?X: outputs a blank line first. This method will apparently work.
56 cf_by=`(logname) 2>/dev/null`
59 cf_by=`(whoami) 2>/dev/null`