File: postinst

package info (click to toggle)
trn 3.6-18
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 1,656 kB
  • ctags: 1,535
  • sloc: ansic: 25,214; sh: 5,081; makefile: 1,030; yacc: 660
file content (55 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (4)
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
#! /bin/sh

case "$1" in
	configure)
		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		exit 0
		;;
esac
umask 022

set -e

update-alternatives --quiet --install \
       /usr/bin/trn trn /usr/lib/trn/trn 36 \
       --slave /usr/share/man/man1/trn.1.gz trn.1.gz \
               /usr/share/man/man1/trn3.1.gz
for x in nntplist trn-artchk; do
       update-alternatives --quiet --install /usr/bin/$x $x /usr/lib/trn/$x 36 \
       --slave /usr/share/man/man1/$x.1.gz $x.1.gz \
       /usr/share/man/man1/trn3-$x.1.gz
done
update-alternatives --quiet --install \
    /usr/bin/rn rn /usr/lib/trn/rn 36
for x in Pnews Rnmail newsetup newsgroups; do
       update-alternatives --quiet --install \
               /usr/bin/$x $x /usr/lib/trn/$x 36 \
               --slave /usr/share/man/man1/$x.1.gz $x.1.gz \
                       /usr/share/man/man1/trn3-$x.1.gz
done

cd /etc

#test for /etc/news/whoami, and create if it's absent
test ! -f news/whoami && touch news/whoami

test -f news/server && exit 0

if ! test -d news
then
	mkdir news
	chown news:news news
	chmod 755 news
fi

echo -n \
'Trn is configured to read news via a NNTP connection. If
you have a local news spool, you should consider installing
nntpd; enter \"localhost\" below in that case.
What news server (NNTP server) should I use for reading
 - enter its full name: '

read server

echo "$server" >news/server