summaryrefslogtreecommitdiff
path: root/mcon/U/nametype.U
blob: 72e036d74b2a097d3d3e62236003974076f7f505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
?RCS: $Id: nametype.U 167 2013-05-08 17:58:00Z rmanfredi $
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?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
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: nametype.U,v $
?RCS: Revision 3.0.1.3  1994/10/29  16:26:09  ram
?RCS: patch36: call ./usg and ./bsd explicitely instead of relying on PATH
?RCS:
?RCS: Revision 3.0.1.2  1994/08/29  16:36:48  ram
?RCS: patch32: fixed typo: /etc/password -> /etc/passwd (WED)
?RCS:
?RCS: Revision 3.0.1.1  1993/09/13  16:10:09  ram
?RCS: patch10: made questions more explicit for 'Configure -s' prompting (WAD)
?RCS:
?RCS: Revision 3.0  1993/08/18  12:09:20  ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
?MAKE:nametype d_passnames d_berknames d_usgnames: Myread Guess Oldconfig cat
?MAKE:	-pick add $@ %<
?S:nametype:
?S:	This variable indicates how full names are stored on this system.
?S:	Values are bsd, usg, and other.
?S:.
?S:d_passnames:
?S:	This variable conditionally defines the PASSNAMES symbol,
?S:	which indicates to the C program that full names are stored in
?S:	the /etc/passwd file.
?S:.
?S:d_berknames:
?S:	This variable conditionally defines the PASSNAMES symbol,
?S:	which indicates to the C program that full names are stored in
?S:	the /etc/passwd file in Berkeley format.
?S:.
?S:d_usgnames:
?S:	This variable conditionally defines the PASSNAMES symbol,
?S:	which indicates to the C program that full names are stored in
?S:	the /etc/passwd file in USG format.
?S:.
?C:PASSNAMES:
?C:	This symbol, if defined, indicates that full names are stored in
?C:	the /etc/passwd file.
?C:.
?C:BERKNAMES:
?C:	This symbol, if defined, indicates that full names are stored in
?C:	the /etc/passwd file in Berkeley format (name first thing, everything
?C:	up to first comma, with & replaced by capitalized login id, yuck).
?C:.
?C:USGNAMES:
?C:	This symbol, if defined, indicates that full names are stored in
?C:	the /etc/passwd file in USG format (everything after - and before ( is
?C:	the name).
?C:.
?H:#$d_passnames PASSNAMES /*  (undef to take name from ~/.fullname) */
?H:#$d_berknames BERKNAMES /* (that is, ":name,stuff:") */
?H:#$d_usgnames USGNAMES  /* (that is, ":stuff-name(stuff):") */
?H:.
: find out how to find out full name
case "$d_berknames" in
"$define")
	dflt=y;;
"$undef")
	dflt=n;;
*)
	if ./bsd; then
		dflt=y
	elif ./xenix; then
		dflt=y
	else
		dflt=n
	fi
	;;
esac
$cat <<'EOM'

Does your /etc/passwd file keep full names in Berkeley/V7 format (name first
thing after ':' in GCOS field)?  In that case, a typical entry in the password
file looks like this:

    guest:**paswword**:10:100:Mister Guest User:/usr/users:/bin/sh
                              ^^^^^^^^^^^^^^^^^
EOM
rp="Berkeley/V7 format for full name in /etc/passwd?"
. ./myread
case "$ans" in
y*) d_passnames="$define"
	d_berknames="$define"
	d_usgnames="$undef"
	nametype=bsd
	;;
*)
	case "$d_usgnames" in
	"$define") dflt=y;;
	"$undef") dflt=n;;
	*)
		if ./usg; then
			dflt=y
		else
			dflt=n
		fi
		;;
	esac
$cat <<'EOM'

Does your passwd file keep full names in USG format (name sandwiched between a
'-' and a '(')?  In that case, a typical entry in the password file looks like
this:

    guest:**paswword**:10:100:000-Mister Guest User(000):/usr/users:/bin/sh
                                  ^^^^^^^^^^^^^^^^^
EOM
	rp="USG format for full name in /etc/passwd?"
	. ./myread
	case "$ans" in
	n*) echo "Full name will be taken from ~/.fullname"
		d_passnames="$undef"
		d_berknames="$undef"
		d_usgnames="$undef"
		nametype=other
		;;
	*)
		d_passnames="$define"
		d_berknames="$undef"
		d_usgnames="$define"
		nametype=usg
		;;
	esac;;
esac