annotate debian/config @ 424:afa2ff7b5ebf noffle

[svn] cleanup
author godisch
date Fri, 20 Jun 2003 16:58:53 +0100
parents e144202d2d96
children c2fd00030991
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
1 #!/bin/sh
424
afa2ff7b5ebf [svn] cleanup
godisch
parents: 396
diff changeset
2 # $Id: config 567 2003-06-20 15:58:53Z godisch $
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
3
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
4 set -e
359
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
5 . /usr/share/debconf/confmodule
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
6 db_version 2.0
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
7 db_capb backup
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
8
395
056d5fcb7f4b [svn] updated deb'configuration
godisch
parents: 364
diff changeset
9 # are we using debconf?
056d5fcb7f4b [svn] updated deb'configuration
godisch
parents: 364
diff changeset
10 db_input high noffle/debconf && db_go || :
056d5fcb7f4b [svn] updated deb'configuration
godisch
parents: 364
diff changeset
11 db_get noffle/debconf
056d5fcb7f4b [svn] updated deb'configuration
godisch
parents: 364
diff changeset
12 if [ "$RET" = false ]; then
056d5fcb7f4b [svn] updated deb'configuration
godisch
parents: 364
diff changeset
13 db_stop
056d5fcb7f4b [svn] updated deb'configuration
godisch
parents: 364
diff changeset
14 exit 0
056d5fcb7f4b [svn] updated deb'configuration
godisch
parents: 364
diff changeset
15 fi
056d5fcb7f4b [svn] updated deb'configuration
godisch
parents: 364
diff changeset
16
324
5ec39beae9c5 [svn] cleanup
godisch
parents: 310
diff changeset
17 # for backward compatibility < 1.1.2-1
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
18 if dpkg --compare-versions "$2" lt-nl 1.1.2; then
360
a23b37308063 [svn] || true cleanup
godisch
parents: 359
diff changeset
19 db_get noffle/fetchmode
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
20 case "$RET" in
360
a23b37308063 [svn] || true cleanup
godisch
parents: 359
diff changeset
21 'via dialup') db_set noffle/fetchmode ppp;;
a23b37308063 [svn] || true cleanup
godisch
parents: 359
diff changeset
22 'via permanent connection') db_set noffle/fetchmode cron;;
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
23 esac
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
24 fi
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
25
359
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
26 # input configuration using backup capability, see debconf-devel(8)
362
c036f2b55576 [svn] cleanup
godisch
parents: 361
diff changeset
27 state=1
c036f2b55576 [svn] cleanup
godisch
parents: 361
diff changeset
28 laststate=7
c036f2b55576 [svn] cleanup
godisch
parents: 361
diff changeset
29 while [ "$state" -ge 0 -a "$state" -le "$laststate" ]; do
359
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
30 case "$state" in
364
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
31 0) db_input high noffle/debconf || :
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
32 ;;
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
33 1) db_input low noffle/port || :
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
34 ;;
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
35 2) db_input high noffle/server || :
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
36 ;;
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
37 3) db_input medium noffle/username || :
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
38 ;;
363
014146ed83bf [svn] cleanup
godisch
parents: 362
diff changeset
39 4) db_get noffle/username
364
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
40 [ "$RET" ] && db_input medium noffle/password || :
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
41 ;;
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
42 5) db_input medium noffle/fetchmode || :
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
43 ;;
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
44 6) db_input medium noffle/maxfetch || :
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
45 ;;
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
46 7) db_input low noffle/default-expire || :
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
47 ;;
359
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
48 esac
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
49 if db_go; then
362
c036f2b55576 [svn] cleanup
godisch
parents: 361
diff changeset
50 if [ "$state" -eq 0 ]; then
361
dec92f910289 [svn] improved debconf backup capability
godisch
parents: 360
diff changeset
51 db_get noffle/debconf
362
c036f2b55576 [svn] cleanup
godisch
parents: 361
diff changeset
52 [ "$RET" = true ] || break
361
dec92f910289 [svn] improved debconf backup capability
godisch
parents: 360
diff changeset
53 fi
359
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
54 state=$(($state + 1))
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
55 else
364
36296f2b60e6 [svn] changed debconf backup
godisch
parents: 363
diff changeset
56 state=0
359
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
57 fi
d1007cf6a49c [svn] added preliminary debconf backup capability
godisch
parents: 341
diff changeset
58 done
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
59
333
47ba9cbc7b75 [svn] added db_stop
godisch
parents: 324
diff changeset
60 db_stop
301
3b5b7f3fd71f [svn] initial debian/ upload
godisch
parents:
diff changeset
61 exit 0