This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
/\=/ does not require \ even in older awk
[metaconfig.git] / U / modified / nis.U
CommitLineData
edd6115f
JH
1?RCS: $Id: nis.U,v 3.0.1.3 1997/02/28 16:17:38 ram Exp $
2?RCS:
3?RCS: Copyright (c) 1991-1993, Raphael Manfredi
65a32477
MBT
4?RCS:
5?RCS: You may redistribute only under the terms of the Artistic License,
edd6115f
JH
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
65a32477 8?RCS: that same Artistic License; a copy of which may be found at the root
edd6115f
JH
9?RCS: of the source tree for dist 3.0.
10?RCS:
11?RCS: $Log: nis.U,v $
12?RCS: Revision 3.0.1.3 1997/02/28 16:17:38 ram
13?RCS: patch61: ensure suitable defaults for hostcat and friends
14?RCS:
15?RCS: Revision 3.0.1.2 1995/03/21 08:48:34 ram
16?RCS: patch52: continued fix for NeXT NIS/NetInfo handling
17?RCS:
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
20?RCS:
21?RCS: Revision 3.0 1993/08/18 12:09:24 ram
22?RCS: Baseline for dist 3.0 netwide release.
23?RCS:
24?MAKE:passcat groupcat hostcat: Myread Oldconfig test contains
25?MAKE: -pick add $@ %<
26?S:passcat:
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.
30?S: On some systems, such as os390, there may be no equivalent
31?S: command, in which case this variable is unset.
32?S:.
33?S:groupcat:
34?S: This variable contains a command that produces the text of the
35?S: /etc/group file. This is normally "cat /etc/group", but can be
36?S: "ypcat group" when NIS is used.
37?S: On some systems, such as os390, there may be no equivalent
38?S: command, in which case this variable is unset.
39?S:.
40?S:hostcat:
41?S: This variable contains a command that produces the text of the
42?S: /etc/hosts file. This is normally "cat /etc/hosts", but can be
43?S: "ypcat hosts" when NIS is used.
44?S: On some systems, such as os390, there may be no equivalent
45?S: command, in which case this variable is unset.
46?S:.
47: see if we have to deal with yellow pages, now NIS.
48?X: NeXT gives us some fun here, as always, by having both NIS (former YP)
49?X: and NetInfo. But since it has both, it's ok to put the test inside the if.
50?X: Contributed by Thomas Neumann <tom@smart.bo.open.de>.
19be151f 51if $test -d /usr/etc/yp || $test -d /etc/yp || $test -d /usr/lib/yp; then
edd6115f
JH
52@if passcat || groupcat
53 case "$passcat" in
54 nidump*) ;;
55 *)
56 case "$passcat" in
57 *ypcat*) dflt=y;;
58 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
59 dflt=y
60 else
61 dflt=n
62 fi;;
63 *) dflt=n;;
64 esac
65 echo " "
66 rp='Are you getting the passwd file via yellow pages?'
67 . ./myread
68 case "$ans" in
69 y*) passcat='ypcat passwd'
70@if groupcat
71 echo "(Assuming /etc/group is also distributed.)"
72 groupcat='ypcat group'
73@end
74 ;;
75 *) passcat='cat /etc/passwd'
76@if groupcat
77 echo "(Assuming /etc/group is also local.)"
78 groupcat='cat /etc/group'
79@end
80 ;;
81 esac
82 ;;
83 esac
84@end
85@if hostcat
86 case "$hostcat" in
87 nidump*) ;;
88 *)
89 case "$hostcat" in
90 *ypcat*) dflt=y;;
91 '') if $contains '^\+' /etc/passwd >/dev/null 2>&1; then
92 dflt=y
93 else
94 dflt=n
95 fi;;
96 *) dflt=n;;
97 esac
98 echo " "
99 rp='Are you getting the hosts file via yellow pages?'
100 . ./myread
101 case "$ans" in
102 y*) hostcat='ypcat hosts';;
103 *) hostcat='cat /etc/hosts';;
104 esac
105 ;;
106 esac
107@end
108fi
109?X: Ensure suitable default -- Manoj Srivastava
110case "$hostcat" in
111'') test -f /etc/hosts && hostcat='cat /etc/hosts';;
112esac
113case "$groupcat" in
114'') test -f /etc/group && groupcat='cat /etc/group';;
115esac
116case "$passcat" in
117'') test -f /etc/passwd && passcat='cat /etc/passwd';;
118esac
119