8
8
# Use a state machine to allow jumping back to previous questions.
10
while [ "$STATE" != 0 -a "$STATE" != 3 ]; do
10
while [ "$STATE" != 0 ] && [ "$STATE" != 4 ]; do
13
if test -d /etc/apache/conf.d || test -d /etc/apache-ssl/conf.d \
14
|| test -d /etc/apache-perl/conf.d; then
15
db_input high lurker/apache_config || true
13
for entry in /etc/apache*/conf.d; do
17
if [ "$apache" = "yes" ]; then
18
db_input high lurker/apache_config || true
17
20
db_input high lurker/webserver || true
19
23
if [ -e /etc/lurker/lurker.conf ]; then
20
if dpkg --compare-versions "$2" ">=" 0.9; then
21
export archve=`lurker-params -c /etc/lurker/lurker.conf -a`
22
export admnme=`lurker-params -c /etc/lurker/lurker.conf -n`
23
export admadr=`lurker-params -c /etc/lurker/lurker.conf -e`
25
export archve=`grep "^[[:space:]]*archive[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
26
export admnme=`grep "^[[:space:]]*admin_name[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
27
export admadr=`grep "^[[:space:]]*admin_address[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
29
if [ "$archve" ]; then
30
db_set lurker/archive $archve
32
if [ "$admnme" ]; then
33
db_set lurker/admin_name $admnme
35
if [ "$admadr" ]; then
36
db_set lurker/admin_address $admadr
40
db_input low lurker/archive || true
41
db_input low lurker/admin_name || true
42
db_input low lurker/admin_address || true
24
if [ -x "/usr/bin/lurker-params" ]; then
25
archve=`/usr/bin/lurker-params -c /etc/lurker/lurker.conf -a`
26
admnme=`/usr/bin/lurker-params -c /etc/lurker/lurker.conf -n`
27
admadr=`/usr/bin/lurker-params -c /etc/lurker/lurker.conf -e`
29
archve=`grep "^[[:space:]]*archive[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
30
admnme=`grep "^[[:space:]]*admin_name[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
31
admadr=`grep "^[[:space:]]*admin_address[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
33
if [ "$archve" ]; then db_set lurker/archive $archve; fi
34
if [ "$admnme" ]; then db_set lurker/admin_name $admnme; fi
35
if [ "$admadr" ]; then db_set lurker/admin_address $admadr; fi
37
db_input low lurker/archive || true
38
db_input low lurker/admin_name || true
39
db_input low lurker/admin_address || true
48
if [ "$2" ] && dpkg --compare-versions "$2" "<" 0.6; then
49
db_input high lurker/obsolete_db || true
50
elif [ "$2" ] && dpkg --compare-versions "$2" "<" 1.0; then
45
if [ "$2" ] && dpkg --compare-versions "$2" "<" 1.0; then
51
46
if [ -e /var/lib/lurker/db ]; then
52
47
db_input high lurker/upgrade_db || true