3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic License,
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 License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
12 ?RCS: Revision 3.0.1.3 1997/02/28 16:17:38 ram
13 ?RCS: patch61: ensure suitable defaults for hostcat and friends
15 ?RCS: Revision 3.0.1.2 1995/03/21 08:48:34 ram
16 ?RCS: patch52: continued fix for NeXT NIS/NetInfo handling
18 ?RCS: Revision 3.0.1.1 1995/02/15 14:16:23 ram
19 ?RCS: patch51: now correctly handles NeXT using NIS rather than NetInfo
21 ?RCS: Revision 3.0 1993/08/18 12:09:24 ram
22 ?RCS: Baseline for dist 3.0 netwide release.
24 ?MAKE:passcat groupcat hostcat: Myread Oldconfig test contains
25 ?MAKE: -pick add $@ %<
27 ?S: This variable contains a command that produces the text of the
28 ?S: /etc/passwd file. This is normally "cat /etc/passwd", but can be
29 ?S: "ypcat passwd" when NIS is used.
32 ?S: This variable contains a command that produces the text of the
33 ?S: /etc/group file. This is normally "cat /etc/group", but can be
34 ?S: "ypcat group" when NIS is used.
37 ?S: This variable contains a command that produces the text of the
38 ?S: /etc/hosts file. This is normally "cat /etc/hosts", but can be
39 ?S: "ypcat hosts" when NIS is used.
41 : see if we have to deal with yellow pages, now NIS.
42 ?X: NeXT gives us some fun here, as always, by having both NIS (former YP)
43 ?X: and NetInfo. But since it has both, it's ok to put the test inside the if.
44 ?X: Contributed by Thomas Neumann <tom@smart.bo.open.de>.
45 if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
46 if $test -f /usr/etc/nibindd; then
48 echo "I'm fairly confident you're on a NeXT."
49 @if passcat || groupcat
51 rp='Do you get the passwd file via NetInfo?'
60 y*) passcat='nidump passwd .'
62 echo "(Assuming /etc/group is also distributed.)"
63 groupcat='nidump group .'
66 *) echo "You told me, so don't blame me."
74 echo "(Assuming /etc/group is handled the same way.)"
81 rp='Do you get the hosts file via NetInfo?'
90 y*) hostcat='nidump hosts .';;
98 @if passcat || groupcat
104 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
112 rp='Are you getting the passwd file via yellow pages?'
115 y*) passcat='ypcat passwd'
117 echo "(Assuming /etc/group is also distributed.)"
118 groupcat='ypcat group'
121 *) passcat='cat /etc/passwd'
123 echo "(Assuming /etc/group is also local.)"
124 groupcat='cat /etc/group'
137 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
145 rp='Are you getting the hosts file via yellow pages?'
148 y*) hostcat='ypcat hosts';;
149 *) hostcat='cat /etc/hosts';;
155 ?X: Ensure suitable default -- Manoj Srivastava
158 $test -f /etc/hosts && hostcat='cat /etc/hosts';;
162 $test -f /etc/group && groupcat='cat /etc/group';;
166 $test -f /etc/passwd && passcat='cat /etc/passwd';;