Imported initial Debian directory
[rrq/maintain_lilo.git] / debian / lilo.config
1 #!/bin/sh
2
3 set -e
4
5 action=$1
6 version=$2
7
8 # debconf
9 . /usr/share/debconf/confmodule
10 db_version 2.0
11
12 isfresh=0
13 have_to_run=0
14
15 if [ ! -f /etc/lilo.conf ]; then
16         isfresh=1
17         db_text high lilo/new-config || true
18         db_go
19 else
20         # Check for deprecated PATH. Bug#267538
21         if grep -q "^bitmap=/usr/share/lilo/contrib" /etc/lilo.conf; then
22                 db_beginblock
23                 db_text high lilo/bad_bitmap || true
24                 db_endblock
25                 db_go
26         fi
27
28         if grep -q "^[[:space:]]*large-memory" /etc/lilo.conf; then
29                 db_set lilo/add_large_memory false
30         else
31                 db_beginblock
32                 db_text high lilo/add_large_memory || true
33                 db_endblock
34                 db_go
35
36                 db_get lilo/add_large_memory || true;
37                 if [ x"$RET" = x"true" ]; then
38                         have_to_run=1
39                 fi
40         fi
41 fi
42
43 if [ x"$isfresh" = x"0" ]; then
44         if [ -e /boot/boot.b ]; then    
45                 have_to_run=1
46                 db_beginblock
47                 db_text high lilo/upgrade || true
48                 db_endblock
49                 db_go
50         fi
51 fi
52
53 #db_set lilo/runme = false
54
55 if [ x"$have_to_run" != x"0" ]; then
56         db_beginblock   
57         db_input high lilo/runme || true
58         db_endblock
59         db_go
60 fi
61
62 exit 0