Mercurial > noffle
comparison debian/postinst @ 360:a23b37308063 noffle
[svn] || true cleanup
author | godisch |
---|---|
date | Sat, 29 Mar 2003 06:57:20 +0000 |
parents | 56c3a43af1d5 |
children | 056d5fcb7f4b |
comparison
equal
deleted
inserted
replaced
359:d1007cf6a49c | 360:a23b37308063 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # $Id: postinst 465 2003-02-25 19:15:27Z godisch $ | 2 # $Id: postinst 499 2003-03-29 06:57:20Z godisch $ |
3 | 3 |
4 set -e | 4 set -e |
5 | 5 |
6 [ "$1" = configure ] || exit 0 | 6 [ "$1" = configure ] || exit 0 |
7 | 7 |
33 # 1.1.2-1 was in unstable only, don't notify | 33 # 1.1.2-1 was in unstable only, don't notify |
34 mv -f /etc/noffle.conf $server_config || : | 34 mv -f /etc/noffle.conf $server_config || : |
35 mv -f /etc/noffle.conf.old $server_config.old 2> /dev/null || : | 35 mv -f /etc/noffle.conf.old $server_config.old 2> /dev/null || : |
36 fi | 36 fi |
37 | 37 |
38 db_get noffle/debconf || RET="" | 38 db_get noffle/debconf |
39 if [ "$RET" != false ]; then | 39 if [ "$RET" != false ]; then |
40 db_get noffle/port || RET="" | 40 db_get noffle/port |
41 port="$RET" | 41 port="$RET" |
42 [ -z "$port" -o "$port" = 119 ] && port=nntp || : | 42 [ -z "$port" -o "$port" = 119 ] && port=nntp || : |
43 # maybe disabled only, e.g. dpkg -r noffle | 43 # maybe disabled only, e.g. dpkg -r noffle |
44 update-inetd --remove "/usr/bin/noffle -r" || : | 44 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" | 45 update-inetd --group MAIL --add "$port\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" |
46 db_get noffle/server || RET="" | 46 db_get noffle/server |
47 server="$RET" | 47 server="$RET" |
48 [ "$server" ] || server=news | 48 [ "$server" ] || server=news |
49 db_get noffle/username || RET="" | 49 db_get noffle/username |
50 username="$RET" | 50 username="$RET" |
51 db_get noffle/password || RET="" | 51 db_get noffle/password |
52 password="$RET" | 52 password="$RET" |
53 db_get noffle/fetchmode || RET="" | 53 db_get noffle/fetchmode |
54 fetchmode="$RET" | 54 fetchmode="$RET" |
55 [ "$fetchmode" ] || if [ -x /usr/sbin/pppd ]; then | 55 [ "$fetchmode" ] || if [ -x /usr/sbin/pppd ]; then |
56 fetchmode=ppp | 56 fetchmode=ppp |
57 else | 57 else |
58 fetchmode=cron | 58 fetchmode=cron |
59 fi | 59 fi |
60 db_get noffle/maxfetch || RET="" | 60 db_get noffle/maxfetch |
61 maxfetch="$RET" | 61 maxfetch="$RET" |
62 [ "$maxfetch" ] || maxfetch="$maxfetch_default" | 62 [ "$maxfetch" ] || maxfetch="$maxfetch_default" |
63 db_get noffle/default-expire || RET="" | 63 db_get noffle/default-expire |
64 defexpire="$RET" | 64 defexpire="$RET" |
65 [ "$defexpire" ] || defexpire="$defexpire_default" | 65 [ "$defexpire" ] || defexpire="$defexpire_default" |
66 # try to be idempotent | 66 # try to be idempotent |
67 if [ ! -e $server_config.new -a ! -e $debian_config.new ]; then | 67 if [ ! -e $server_config.new -a ! -e $debian_config.new ]; then |
68 # make some backup files | 68 # make some backup files |