]>
Commit | Line | Data |
---|---|---|
d5f2ba39 PP |
1 | #!/bin/sh |
2 | ||
3 | set -e | |
4 | ||
5 | . /usr/share/debconf/confmodule | |
6 | db_version 2.0 | |
7 | db_capb backup | |
8 | ||
9 | if [ -e /etc/mailname ]; then | |
7fdcd0c2 | 10 | db_set dma/mailname "`cat /etc/mailname`" || true |
d5f2ba39 | 11 | else |
7fdcd0c2 | 12 | db_get dma/mailname || true |
d5f2ba39 | 13 | if [ -z "$RET" ]; then |
7fdcd0c2 | 14 | db_set dma/mailname "`hostname --fqdn`" || true |
d5f2ba39 PP |
15 | fi |
16 | fi | |
17 | ||
9224aaf9 | 18 | db_get dma/dbounceprog || true |
ae8d91d5 | 19 | if [ -z "$RET" ]; then |
9224aaf9 | 20 | db_set dma/dbounceprog 'dbounce-simple-safecat' || true |
d5f2ba39 PP |
21 | fi |
22 | ||
23 | state=1 | |
24 | while [ "$state" -ge 1 -a "$state" -le 3 ]; do | |
25 | case "$state" in | |
7fdcd0c2 | 26 | 1) db_input high dma/mailname || true |
d5f2ba39 PP |
27 | ;; |
28 | 2) db_input high dma/relayhost || true | |
29 | ;; | |
30 | 3) db_input medium dma/dbounceprog || true | |
31 | ;; | |
32 | esac | |
33 | if db_go; then | |
34 | state=$(($state + 1)) | |
35 | else | |
36 | state=$(($state - 1)) | |
37 | fi | |
38 | done | |
39 | ||
40 | db_stop || true | |
41 | exit 0 |