comparison debian/postinst @ 398:71801bfc07c2 noffle

[svn] update for libdgbm3
author godisch
date Tue, 03 Jun 2003 22:17:53 +0100
parents 056d5fcb7f4b
children b9018588cc52
comparison
equal deleted inserted replaced
397:b66bff23a0ef 398:71801bfc07c2
1 #!/bin/sh 1 #!/bin/sh
2 # $Id: postinst 537 2003-05-29 14:44:56Z godisch $ 2 # $Id: postinst 540 2003-06-03 21:17:53Z godisch $
3 3
4 set -e 4 set -e
5 5
6 [ "$1" = configure ] || exit 0 6 [ "$1" = configure ] || exit 0
7 7
10 10
11 maxfetch_default=300 11 maxfetch_default=300
12 defexpire_default=14 12 defexpire_default=14
13 13
14 if dpkg --compare-versions "$2" lt-nl 1.1.2-1; then 14 if dpkg --compare-versions "$2" lt-nl 1.1.2-1; then
15 echo "" 15 echo
16 echo "/etc/noffle/conf moved to $server_config, /etc/noffle/conf.debian" 16 echo "/etc/noffle/conf moved to $server_config, /etc/noffle/conf.debian"
17 echo "moved to $debian_config. /etc/noffle and /var/log/noffle are not" 17 echo "moved to $debian_config. /etc/noffle and /var/log/noffle are not"
18 echo "used any longer, you may remove them. noffle expiration logs are" 18 echo "used any longer, you may remove them. noffle expiration logs are"
19 echo "still available through syslog." 19 echo "still available through syslog."
20 echo "" 20 echo
21 sleep 2 21 sleep 2
22 mv -f /etc/noffle/conf $server_config || : 22 mv -f /etc/noffle/conf $server_config || :
23 mv -f /etc/noffle/conf.debian $debian_config || : 23 mv -f /etc/noffle/conf.debian $debian_config || :
24 mv -f /etc/noffle/conf.old $server_config.old 2> /dev/null || : 24 mv -f /etc/noffle/conf.old $server_config.old 2> /dev/null || :
25 mv -f /etc/noffle/conf.debian.old $debian_config.old 2> /dev/null || : 25 mv -f /etc/noffle/conf.debian.old $debian_config.old 2> /dev/null || :
26 rmdir /etc/noffle || : 26 rmdir --ignore-fail-on-non-empty /etc/noffle
27 fi 27 fi
28 28
29 if dpkg --compare-versions "$2" eq 1.1.2-1; then 29 if dpkg --compare-versions "$2" eq 1.1.2-1; then
30 # 1.1.2-1 was in unstable only, don't notify 30 # 1.1.2-1 was in unstable only, don't notify
31 mv -f /etc/noffle.conf $server_config || : 31 mv -f /etc/noffle.conf $server_config || :
37 db_version 2.0 37 db_version 2.0
38 db_get noffle/debconf 38 db_get noffle/debconf
39 if [ "$RET" = true ]; then 39 if [ "$RET" = true ]; then
40 db_get noffle/port 40 db_get noffle/port
41 port="$RET" 41 port="$RET"
42 [ -z "$port" -o "$port" = 119 ] && port=nntp || : 42 if [ -z "$port" -o "$port" = 119 ]; then
43 port=nntp
44 fi
43 # maybe disabled only, e.g. dpkg -r noffle 45 # maybe disabled only, e.g. dpkg -r noffle
44 update-inetd --remove "/usr/bin/noffle -r" || : 46 update-inetd --remove "/usr/bin/noffle -r" || :
45 update-inetd --group MAIL --add "$port\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" 47 update-inetd --group MAIL --add "$port\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r"
46 db_get noffle/server 48 db_get noffle/server
47 server="$RET" 49 server="$RET"
115 elif [ -x /etc/init.d/noffle ]; then 117 elif [ -x /etc/init.d/noffle ]; then
116 /etc/init.d/noffle start 118 /etc/init.d/noffle start
117 fi 119 fi
118 120
119 if [ -z "$2" ]; then 121 if [ -z "$2" ]; then
120 echo "" 122 echo
121 echo "You need to query your parent NNTP server manually for a group overview" 123 echo "You need to query your parent NNTP server manually for a group overview"
122 echo "and descriptions. Have a look at /usr/share/doc/noffle/README.Debian for" 124 echo "and descriptions. Have a look at /usr/share/doc/noffle/README.Debian for"
123 echo "information how to do this." 125 echo "information how to do this."
124 echo "" 126 echo
125 sleep 2 127 sleep 2
126 fi 128 fi
127 129
128 exit 0 130 exit 0