This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[UTIL] Perl system does not default to $_
[metaconfig.git] / dist / U / d_newsadm.U
CommitLineData
d8875586
MBT
1?RCS: $Id: d_newsadm.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: d_newsadm.U,v $
12?RCS: Revision 3.0.1.2 1997/02/28 15:36:53 ram
13?RCS: patch61: added Guess dependency
14?RCS:
15?RCS: Revision 3.0.1.1 1994/10/29 16:14:33 ram
16?RCS: patch36: call ./eunice explicitly instead of relying on PATH
17?RCS:
18?RCS: Revision 3.0 1993/08/18 12:06:42 ram
19?RCS: Baseline for dist 3.0 netwide release.
20?RCS:
21?MAKE:d_newsadm newsadmin: cat contains Guess Setvar Myread Oldconfig
22?MAKE: -pick add $@ %<
23?S:d_newsadm:
24?S: This variable conditionally defines the NEWS_ADMIN symbol, which
25?S: indicates to the C program that there is a user who is in charge
26?S: of news administration.
27?S:.
28?S:newsadmin:
29?S: This variable holds the login name of the news administrator, if any.
30?S:.
31?C:NEWS_ADMIN (NEWSADMIN):
32?C: This symbol, if defined, contains the login name of the news
33?C: administrator.
34?C:.
35?H:#$d_newsadm NEWS_ADMIN "$newsadmin" /**/
36?H:.
37?LINT:set d_newsadm
38: get news administrator name
39case "$newsadmin" in
40'')
41 if $contains "^news:" /etc/passwd >/dev/null 2>&1 ; then
42 dflt=news
43 elif $contains "^usenet:" /etc/passwd >/dev/null 2>&1 ; then
44 dflt=usenet
45 elif ./eunice; then
46 dflt=system
47 else
48 dflt=root
49 fi
50 ;;
51*)
52 dflt="$newsadmin"
53 ;;
54esac
55$cat <<'EOM'
56
57Many systems keep their news in a private directory, or have a non-superuser
58in charge of administering news. (If you don't have such a user, take the
59default answer.) I need the login name (not directory) which is used for
60news administration.
61
62EOM
63rp="News admin login?"
64. ./myread
65newsadmin="$ans"
66case "$newsadmin" in
67root) val="$undef" ;;
68*) val="$define" ;;
69esac
70set d_newsadm
71eval $setvar
72