301
|
1 #!/bin/sh
|
425
|
2 # $Id: config 568 2003-06-20 16:48:28Z godisch $
|
301
|
3
|
|
4 set -e
|
359
|
5 . /usr/share/debconf/confmodule
|
|
6 db_version 2.0
|
|
7 db_capb backup
|
301
|
8
|
324
|
9 # for backward compatibility < 1.1.2-1
|
301
|
10 if dpkg --compare-versions "$2" lt-nl 1.1.2; then
|
360
|
11 db_get noffle/fetchmode
|
301
|
12 case "$RET" in
|
360
|
13 'via dialup') db_set noffle/fetchmode ppp;;
|
|
14 'via permanent connection') db_set noffle/fetchmode cron;;
|
301
|
15 esac
|
|
16 fi
|
|
17
|
359
|
18 # input configuration using backup capability, see debconf-devel(8)
|
362
|
19 state=1
|
425
|
20 while [ "$state" -ge 1 -a "$state" -le 7 ]; do
|
359
|
21 case "$state" in
|
364
|
22 1) db_input low noffle/port || :
|
|
23 ;;
|
|
24 2) db_input high noffle/server || :
|
|
25 ;;
|
|
26 3) db_input medium noffle/username || :
|
|
27 ;;
|
363
|
28 4) db_get noffle/username
|
364
|
29 [ "$RET" ] && db_input medium noffle/password || :
|
|
30 ;;
|
|
31 5) db_input medium noffle/fetchmode || :
|
|
32 ;;
|
|
33 6) db_input medium noffle/maxfetch || :
|
|
34 ;;
|
|
35 7) db_input low noffle/default-expire || :
|
|
36 ;;
|
359
|
37 esac
|
|
38 if db_go; then
|
|
39 state=$(($state + 1))
|
|
40 else
|
425
|
41 state=$(($state - 1))
|
359
|
42 fi
|
|
43 done
|
301
|
44
|
333
|
45 db_stop
|
301
|
46 exit 0
|