This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the files from dist/meta to perl's repo
[metaconfig.git] / dist / U / nametype.U
CommitLineData
d8875586
MBT
1?RCS: $Id: nametype.U 1 2006-08-24 12:32:52Z rmanfredi $
2?RCS:
3?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
4?RCS:
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 4.0.
10?RCS:
11?RCS: $Log: nametype.U,v $
12?RCS: Revision 3.0.1.3 1994/10/29 16:26:09 ram
13?RCS: patch36: call ./usg and ./bsd explicitly instead of relying on PATH
14?RCS:
15?RCS: Revision 3.0.1.2 1994/08/29 16:36:48 ram
16?RCS: patch32: fixed typo: /etc/password -> /etc/passwd (WED)
17?RCS:
18?RCS: Revision 3.0.1.1 1993/09/13 16:10:09 ram
19?RCS: patch10: made questions more explicit for 'Configure -s' prompting (WAD)
20?RCS:
21?RCS: Revision 3.0 1993/08/18 12:09:20 ram
22?RCS: Baseline for dist 3.0 netwide release.
23?RCS:
24?MAKE:nametype d_passnames d_berknames d_usgnames: Myread Guess Oldconfig cat
25?MAKE: -pick add $@ %<
26?S:nametype:
27?S: This variable indicates how full names are stored on this system.
28?S: Values are bsd, usg, and other.
29?S:.
30?S:d_passnames:
31?S: This variable conditionally defines the PASSNAMES symbol,
32?S: which indicates to the C program that full names are stored in
33?S: the /etc/passwd file.
34?S:.
35?S:d_berknames:
36?S: This variable conditionally defines the PASSNAMES symbol,
37?S: which indicates to the C program that full names are stored in
38?S: the /etc/passwd file in Berkeley format.
39?S:.
40?S:d_usgnames:
41?S: This variable conditionally defines the PASSNAMES symbol,
42?S: which indicates to the C program that full names are stored in
43?S: the /etc/passwd file in USG format.
44?S:.
45?C:PASSNAMES:
46?C: This symbol, if defined, indicates that full names are stored in
47?C: the /etc/passwd file.
48?C:.
49?C:BERKNAMES:
50?C: This symbol, if defined, indicates that full names are stored in
51?C: the /etc/passwd file in Berkeley format (name first thing, everything
52?C: up to first comma, with & replaced by capitalized login id, yuck).
53?C:.
54?C:USGNAMES:
55?C: This symbol, if defined, indicates that full names are stored in
56?C: the /etc/passwd file in USG format (everything after - and before ( is
57?C: the name).
58?C:.
59?H:#$d_passnames PASSNAMES /* (undef to take name from ~/.fullname) */
60?H:#$d_berknames BERKNAMES /* (that is, ":name,stuff:") */
61?H:#$d_usgnames USGNAMES /* (that is, ":stuff-name(stuff):") */
62?H:.
63: find out how to find out full name
64case "$d_berknames" in
65"$define")
66 dflt=y;;
67"$undef")
68 dflt=n;;
69*)
70 if ./bsd; then
71 dflt=y
72 elif ./xenix; then
73 dflt=y
74 else
75 dflt=n
76 fi
77 ;;
78esac
79$cat <<'EOM'
80
81Does your /etc/passwd file keep full names in Berkeley/V7 format (name first
82thing after ':' in GCOS field)? In that case, a typical entry in the password
83file looks like this:
84
85 guest:**paswword**:10:100:Mister Guest User:/usr/users:/bin/sh
86 ^^^^^^^^^^^^^^^^^
87EOM
88rp="Berkeley/V7 format for full name in /etc/passwd?"
89. ./myread
90case "$ans" in
91y*) d_passnames="$define"
92 d_berknames="$define"
93 d_usgnames="$undef"
94 nametype=bsd
95 ;;
96*)
97 case "$d_usgnames" in
98 "$define") dflt=y;;
99 "$undef") dflt=n;;
100 *)
101 if ./usg; then
102 dflt=y
103 else
104 dflt=n
105 fi
106 ;;
107 esac
108$cat <<'EOM'
109
110Does your passwd file keep full names in USG format (name sandwiched between a
111'-' and a '(')? In that case, a typical entry in the password file looks like
112this:
113
114 guest:**paswword**:10:100:000-Mister Guest User(000):/usr/users:/bin/sh
115 ^^^^^^^^^^^^^^^^^
116EOM
117 rp="USG format for full name in /etc/passwd?"
118 . ./myread
119 case "$ans" in
120 n*) echo "Full name will be taken from ~/.fullname"
121 d_passnames="$undef"
122 d_berknames="$undef"
123 d_usgnames="$undef"
124 nametype=other
125 ;;
126 *)
127 d_passnames="$define"
128 d_berknames="$undef"
129 d_usgnames="$define"
130 nametype=usg
131 ;;
132 esac;;
133esac
134