Mercurial > noffle
comparison debian/postinst @ 443:b415fa4d18ee noffle
[svn] update
author | godisch |
---|---|
date | Wed, 25 Jun 2003 16:41:02 +0100 |
parents | 011e51924b23 |
children | bfdba1698a58 |
comparison
equal
deleted
inserted
replaced
442:fc3e4fc0a88d | 443:b415fa4d18ee |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # $Id: postinst 571 2003-06-20 17:04:24Z godisch $ | 2 # $Id: postinst 586 2003-06-25 15:41:02Z godisch $ |
3 | 3 |
4 set -e | 4 set -e |
5 | 5 |
6 [ "$1" = configure ] || exit 0 | 6 [ "$1" = configure ] || exit 0 |
7 | 7 |
14 echo "moved to /etc/default/noffle. /etc/noffle and /var/log/noffle are not" | 14 echo "moved to /etc/default/noffle. /etc/noffle and /var/log/noffle are not" |
15 echo "used any longer, you may remove them. noffle expiration logs are" | 15 echo "used any longer, you may remove them. noffle expiration logs are" |
16 echo "still available through syslog." | 16 echo "still available through syslog." |
17 echo | 17 echo |
18 sleep 2 | 18 sleep 2 |
19 mv -fb /etc/noffle/conf /etc/news/noffle.conf || : | 19 mv -fb /etc/noffle/conf /etc/news/noffle.conf || true |
20 mv -fb /etc/noffle/conf.debian /etc/default/noffle || : | 20 mv -fb /etc/noffle/conf.debian /etc/default/noffle || true |
21 mv -fb /etc/noffle/conf.old /etc/news/noffle.conf.old 2> /dev/null || : | 21 mv -fb /etc/noffle/conf.old /etc/news/noffle.conf.old 2> /dev/null || true |
22 mv -fb /etc/noffle/conf.debian.old /etc/default/noffle.old 2> /dev/null || : | 22 mv -fb /etc/noffle/conf.debian.old /etc/default/noffle.old 2> /dev/null || true |
23 rmdir --ignore-fail-on-non-empty /etc/noffle | 23 rmdir /etc/noffle 2> /dev/null || true |
24 fi | 24 fi |
25 | 25 |
26 if dpkg --compare-versions "$2" eq 1.1.2-1; then | 26 if dpkg --compare-versions "$2" eq 1.1.2-1; then |
27 # 1.1.2-1 was in unstable only, don't notify | 27 # 1.1.2-1 was in unstable only, don't notify |
28 mv -fb /etc/noffle.conf /etc/news/noffle.conf || : | 28 mv -fb /etc/noffle.conf /etc/news/noffle.conf || true |
29 mv -fb /etc/noffle.conf.old /etc/news/noffle.conf.old 2> /dev/null || : | 29 mv -fb /etc/noffle.conf.old /etc/news/noffle.conf.old 2> /dev/null || true |
30 fi | 30 fi |
31 | 31 |
32 if [ -e /usr/share/debconf/confmodule ]; then | 32 if [ -e /usr/share/debconf/confmodule ]; then |
33 . /usr/share/debconf/confmodule | 33 . /usr/share/debconf/confmodule |
34 db_version 2.0 | 34 db_version 2.0 |
82 | 82 |
83 db_stop | 83 db_stop |
84 else | 84 else |
85 ucf --three-way /usr/share/noffle/noffle.conf /etc/news/noffle.conf < /dev/tty | 85 ucf --three-way /usr/share/noffle/noffle.conf /etc/news/noffle.conf < /dev/tty |
86 ucf --three-way /usr/share/noffle/conf.debian /etc/default/noffle < /dev/tty | 86 ucf --three-way /usr/share/noffle/conf.debian /etc/default/noffle < /dev/tty |
87 port="`grep "/usr/bin/noffle -r" /etc/inetd.conf 2> /dev/null | sed 's/[[:space:]].*$//'`" || : | 87 port="`grep "/usr/bin/noffle -r" /etc/inetd.conf 2> /dev/null | sed 's/[[:space:]].*$//'`" || true |
88 if [ "$port" ]; then | 88 if [ "$port" ]; then |
89 update-inetd --enable "$port" | 89 update-inetd --enable "$port" |
90 else | 90 else |
91 update-inetd --group MAIL --add "nntp\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" | 91 update-inetd --group MAIL --add "nntp\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" |
92 fi | 92 fi |