Mercurial > noffle
view debian/config @ 396:e144202d2d96 noffle
[svn] updated deb'configuration
author | godisch |
---|---|
date | Thu, 29 May 2003 15:55:19 +0100 |
parents | 056d5fcb7f4b |
children | afa2ff7b5ebf |
line wrap: on
line source
#!/bin/sh # $Id: config 538 2003-05-29 14:55:19Z godisch $ set -e . /usr/share/debconf/confmodule db_version 2.0 db_capb backup # are we using debconf? db_input high noffle/debconf && db_go || : db_get noffle/debconf if [ "$RET" = false ]; then db_stop exit 0 fi server_config=/etc/news/noffle.conf debian_config=/etc/default/noffle # for backward compatibility = 1.1.2-1, since postinst is not run yet if [ ! -e $server_config -a -e /etc/noffle.conf ]; then server_config=/etc/noffle.conf fi # for backward compatibility < 1.1.2-1 if [ ! -e $server_config -a ! -e $debian_config -a -e /etc/noffle/conf ]; then server_config=/etc/noffle/conf debian_config=/etc/noffle/conf.debian fi # for backward compatibility < 1.1.2-1 if dpkg --compare-versions "$2" lt-nl 1.1.2; then db_get noffle/fetchmode case "$RET" in 'via dialup') db_set noffle/fetchmode ppp;; 'via permanent connection') db_set noffle/fetchmode cron;; esac fi # input configuration using backup capability, see debconf-devel(8) state=1 laststate=7 while [ "$state" -ge 0 -a "$state" -le "$laststate" ]; do case "$state" in 0) db_input high noffle/debconf || : ;; 1) db_input low noffle/port || : ;; 2) db_input high noffle/server || : ;; 3) db_input medium noffle/username || : ;; 4) db_get noffle/username [ "$RET" ] && db_input medium noffle/password || : ;; 5) db_input medium noffle/fetchmode || : ;; 6) db_input medium noffle/maxfetch || : ;; 7) db_input low noffle/default-expire || : ;; esac if db_go; then if [ "$state" -eq 0 ]; then db_get noffle/debconf [ "$RET" = true ] || break fi state=$(($state + 1)) else state=0 fi done db_stop exit 0