Mercurial > noffle
comparison debian/postinst @ 486:a5cb498bcbed noffle
[svn] *** empty log message ***
author | godisch |
---|---|
date | Sun, 28 Nov 2004 09:46:27 +0000 |
parents | fb5e1ef118eb |
children |
comparison
equal
deleted
inserted
replaced
485:8d6a9b040583 | 486:a5cb498bcbed |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # $Id: postinst 604 2003-07-14 06:56:43Z godisch $ | 2 # $Id: postinst 633 2004-11-28 09:46:27Z godisch $ |
3 | 3 |
4 set -e | 4 set -e |
5 | 5 |
6 [ "$1" = configure ] || exit 0 | 6 [ "$1" = configure ] || exit 0 |
7 | 7 |
39 sed "s/^server[[:space:]].*/server $server $username $password/" | \ | 39 sed "s/^server[[:space:]].*/server $server $username $password/" | \ |
40 sed "s/^max-fetch[[:space:]].*/max-fetch $maxfetch/" | \ | 40 sed "s/^max-fetch[[:space:]].*/max-fetch $maxfetch/" | \ |
41 sed "s/^default-expire[[:space:]].*/default-expire $defexpire/" \ | 41 sed "s/^default-expire[[:space:]].*/default-expire $defexpire/" \ |
42 > /etc/news/noffle.conf.new | 42 > /etc/news/noffle.conf.new |
43 chgrp news /etc/news/noffle.conf.new | 43 chgrp news /etc/news/noffle.conf.new |
44 ucf /etc/news/noffle.conf.new /etc/news/noffle.conf < /dev/tty | 44 ucf --debconf-ok /etc/news/noffle.conf.new /etc/news/noffle.conf |
45 rm -f /etc/news/noffle.conf.new | 45 rm -f /etc/news/noffle.conf.new |
46 | 46 |
47 umask 022 | 47 umask 022 |
48 cat /usr/share/noffle/conf.debian | \ | 48 cat /usr/share/noffle/conf.debian | \ |
49 sed "s/^NOFFLE_FETCHMODE=.*/NOFFLE_FETCHMODE=$fetchmode/" \ | 49 sed "s/^NOFFLE_FETCHMODE=.*/NOFFLE_FETCHMODE=$fetchmode/" \ |
50 > /etc/default/noffle.new | 50 > /etc/default/noffle.new |
51 ucf /etc/default/noffle.new /etc/default/noffle < /dev/tty | 51 ucf --debconf-ok /etc/default/noffle.new /etc/default/noffle |
52 rm -f /etc/default/noffle.new | 52 rm -f /etc/default/noffle.new |
53 | 53 |
54 db_get noffle/port | 54 db_get noffle/port |
55 port="$RET" | 55 port="$RET" |
56 if [ -z "$port" -o "$port" = 119 ]; then | 56 if [ -z "$port" -o "$port" = 119 ]; then |
59 update-inetd --remove "/usr/bin/noffle -r" | 59 update-inetd --remove "/usr/bin/noffle -r" |
60 update-inetd --group MAIL --add "$port\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" | 60 update-inetd --group MAIL --add "$port\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" |
61 | 61 |
62 db_stop | 62 db_stop |
63 else | 63 else |
64 ucf /usr/share/noffle/noffle.conf /etc/news/noffle.conf < /dev/tty | 64 ucf /usr/share/noffle/noffle.conf /etc/news/noffle.conf |
65 ucf /usr/share/noffle/conf.debian /etc/default/noffle < /dev/tty | 65 ucf /usr/share/noffle/conf.debian /etc/default/noffle |
66 port="`grep "/usr/bin/noffle -r" /etc/inetd.conf 2> /dev/null | sed 's/[[:space:]].*$//'`" || true | 66 port="`grep "/usr/bin/noffle -r" /etc/inetd.conf 2> /dev/null | sed 's/[[:space:]].*$//'`" || true |
67 if [ "$port" ]; then | 67 if [ "$port" ]; then |
68 update-inetd --enable "$port" | 68 update-inetd --enable "$port" |
69 else | 69 else |
70 update-inetd --group MAIL --add "nntp\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" | 70 update-inetd --group MAIL --add "nntp\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" |