Add externs to avoid multiple definitions, and then add missing definitions.
[rrq/maintain_lilo.git] / debian / lilo.config
1 #!/bin/sh
2 # debian/lilo.config for debconf to be executed before unpacking
3
4 set -e
5
6 action=$1
7 version=$2
8
9 # debconf
10 . /usr/share/debconf/confmodule
11 db_version 2.0
12
13 isfresh=0
14 have_to_run=0
15
16 if [ ! -f /etc/lilo.conf ]; then
17         isfresh=1
18         db_text high lilo/new-config || true
19         db_go
20 else
21         if grep -q "^[[:space:]]*large-memory" /etc/lilo.conf; then
22                 db_set lilo/add_large_memory false
23         else
24                 db_beginblock
25                 db_text high lilo/add_large_memory || true
26                 db_endblock
27                 db_go
28
29                 db_get lilo/add_large_memory || true;
30                 if [ x"$RET" = x"true" ]; then
31                         have_to_run=1
32                 fi
33         fi
34
35         # Convert old options 'boot' and 'root' to newer diskid or uuid
36         if grep -q -E "^boot|^root|^\troot" /etc/lilo.conf; then
37                 db_beginblock
38                 db_text high lilo/diskid_uuid || true
39                 db_endblock
40                 db_go
41         fi
42 fi
43
44 if [ x"$have_to_run" != x"0" ]; then
45         db_beginblock   
46         db_input high lilo/runme || true
47         db_endblock
48         db_go
49 fi
50
51 exit 0