Mercurial > noffle
comparison debian/postinst @ 325:c36eb2596531 noffle
[svn] fixed inclusion of db_*
author | godisch |
---|---|
date | Sun, 23 Feb 2003 15:16:46 +0000 |
parents | 5ec39beae9c5 |
children | 56c3a43af1d5 |
comparison
equal
deleted
inserted
replaced
324:5ec39beae9c5 | 325:c36eb2596531 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # $Id: postinst 459 2003-02-22 21:54:34Z godisch $ | 2 # $Id: postinst 460 2003-02-23 15:16:46Z godisch $ |
3 | 3 |
4 set -e | 4 set -e |
5 | 5 |
6 [ "$1" = configure ] || exit 0 | 6 [ "$1" = configure ] || exit 0 |
7 | |
8 . /usr/share/debconf/confmodule | |
9 db_version 2.0 | |
7 | 10 |
8 server_config=/etc/news/noffle.conf | 11 server_config=/etc/news/noffle.conf |
9 debian_config=/etc/default/noffle | 12 debian_config=/etc/default/noffle |
10 | 13 |
11 maxfetch_default=300 | 14 maxfetch_default=300 |
29 if dpkg --compare-versions "$2" eq 1.1.2-1; then | 32 if dpkg --compare-versions "$2" eq 1.1.2-1; then |
30 # 1.1.2-1 was in unstable only, don't notify | 33 # 1.1.2-1 was in unstable only, don't notify |
31 mv -f /etc/noffle.conf $server_config || : | 34 mv -f /etc/noffle.conf $server_config || : |
32 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 || : |
33 fi | 36 fi |
34 | |
35 . /usr/share/debconf/confmodule | |
36 db_version 2.0 | |
37 | 37 |
38 db_get noffle/debconf || RET="" | 38 db_get noffle/debconf || RET="" |
39 if [ "$RET" != false ]; then | 39 if [ "$RET" != false ]; then |
40 db_get noffle/port || RET="" | 40 db_get noffle/port || RET="" |
41 port="$RET" | 41 port="$RET" |
85 sed "s/^NOFFLE_FETCHMODE=.*/NOFFLE_FETCHMODE=$fetchmode/" \ | 85 sed "s/^NOFFLE_FETCHMODE=.*/NOFFLE_FETCHMODE=$fetchmode/" \ |
86 > $debian_config.new | 86 > $debian_config.new |
87 mv -f $server_config.new $server_config | 87 mv -f $server_config.new $server_config |
88 mv -f $debian_config.new $debian_config | 88 mv -f $debian_config.new $debian_config |
89 fi | 89 fi |
90 db_stop | |
91 | 90 |
92 # sanity checks | 91 # sanity checks |
93 chown -R news:news /var/lock/noffle /var/spool/noffle | 92 chown -R news:news /var/lock/noffle /var/spool/noffle |
94 chmod -R go-w /var/lock/noffle /var/spool/noffle | 93 chmod -R go-w /var/lock/noffle /var/spool/noffle |
95 find /var/lock/noffle /var/spool/noffle -type d -print0 | xargs -0 chmod g+s | 94 find /var/lock/noffle /var/spool/noffle -type d -print0 | xargs -0 chmod g+s |
109 echo "information how to do this." | 108 echo "information how to do this." |
110 echo "" | 109 echo "" |
111 sleep 2 | 110 sleep 2 |
112 fi | 111 fi |
113 | 112 |
113 db_stop | |
114 exit 0 | 114 exit 0 |