4 # see: dh_installdeb(1)
8 if [ -f /usr/share/debconf/confmodule ]; then
9 . /usr/share/debconf/confmodule
12 # remove old-named config files
13 dpkg-maintscript-helper rm_conffile \
14 /etc/kernel/postinst.d/zz-lilo 1:22.8-10 lilo -- "$@"
16 dpkg-maintscript-helper rm_conffile \
17 /etc/kernel/postrm.d/zz-lilo 1:22.8-10 lilo -- "$@"
19 dpkg-maintscript-helper rm_conffile \
20 /etc/kernel/postinst.d/zz-lilo 1:22.8-10 lilo -- "$@"
22 dpkg-maintscript-helper rm_conffile \
23 /etc/initramfs/post-update.d/lilo 1:22.8-10 lilo -- "$@"
26 # targets: configure|abort-upgrade|abort-remove|abort-deconfigure
29 configure|reconfigure)
31 # if a new install then we create the link and exit
32 if grep -q "^# UNCONFIGURED FSTAB FOR BASE SYSTEM" /etc/fstab ; then
36 # Check whether /boot is on another partition and mount it. See Bug#216250
37 if grep "[[:space:]]/boot[[:space:]]" /etc/fstab | grep -vq "^#"; then
38 if ! grep -q "[[:space:]]/boot[[:space:]]" /etc/mtab ; then
39 mount /boot > /dev/null 2>&1
43 echo "WARNING: /boot is in another partition but could not be mounted."
44 echo "LILO may fail in the next steps!"
49 # copy all background images to the right place
50 if [ -L /boot/debian.bmp ]; then
51 rm -f /boot/debian.bmp; fi
53 install -m 0644 /usr/share/lilo/*.bmp /boot
55 # Nasty part to create network block devices if needed. Bug#235805.
56 if [ `uname -r | sed -e 's/-.*//g' -ne 's/\(^[0-9]\{1\}\.[0-9]\{1,2\}\).*/\1/p'` = "2.6" ] && \
57 [ `uname -r | sed -e 's/-.*//g' -ne 's/.*\.\([0-9]\{1,3\}\).*/\1/p'` -ge "3" ]; then
59 garbage=$(cat /proc/partitions | sed -ne 's/^[ \t]*//pg' | sed -ne '/^43/p')
61 if [ x"$garbage" != "x" ]; then
62 # Create the missing devices
63 echo -n "Creating network block devices... "
64 (cd /dev; ./MAKEDEV nb) > /dev/null
69 db_get lilo/add_large_memory || true;
70 if [ x"$RET" = x"true" -a -e /etc/lilo.conf ]; then
71 if ! grep -q "^[[:space:]]*large-memory" /etc/lilo.conf; then
72 sed -i -e '1i\# Automatically added by lilo postinst script\nlarge-memory\n' /etc/lilo.conf
73 echo "WARNING: Added option 'large-memory', please run 'lilo' before you reboot."
77 db_get lilo/diskid_uuid || true;
78 if [ x"$RET" = x"true" -a -e /etc/lilo.conf ]; then
79 if [ `grep -c -E "dev/disk/by-|UUID=" /etc/lilo.conf` -lt 2 ]; then
80 if test -x /usr/sbin/lilo-uuid-diskid; then
82 echo "WARNING: If boot / root options were converted, please run 'lilo' before you reboot."
87 db_get lilo/runme || true;
88 if [ x"$RET" = x"true" ]; then
89 echo "Running lilo..."
94 abort-upgrade|abort-remove|abort-deconfigure)
98 echo "postinst called with unknown argument \`$1'" >&2
103 # dh_installdeb will replace this with shell code automatically
104 # generated by other debhelper scripts.