4 # see: dh_installdeb(1)
10 if [ -f /usr/share/debconf/confmodule ]; then
11 . /usr/share/debconf/confmodule
14 # targets: configure|abort-upgrade|abort-remove|abort-deconfigure
17 configure|reconfigure)
19 # if a new install then we create the link and exit
20 if grep -q "^# UNCONFIGURED FSTAB FOR BASE SYSTEM" /etc/fstab ; then
24 # Check whether /boot is on another partition and mount it. See Bug#216250
25 if grep "[[:space:]]/boot[[:space:]]" /etc/fstab | grep -vq "^#"; then
26 if ! grep -q "[[:space:]]/boot[[:space:]]" /etc/mtab ; then
27 mount /boot 2>&1 > /dev/null
31 echo "WARNING: /boot is in another partition but could not be mounted."
32 echo "LILO may fail in the next steps!"
37 # copy all background images to the right place
38 if [ -L /boot/debian.bmp ]; then
39 rm -f /boot/debian.bmp; fi
41 install -m 0644 /usr/share/lilo/*.bmp /boot
42 # stay compatible with old lilo 22.8
44 ln -s debian.bmp /boot/${i}.bmp
47 # remove scripts of old lilo 22.8 if still exist
48 if test -f /etc/kernel/postinst.d/zz-lilo; then
49 rm -f /etc/kernel/postinst.d/zz-lilo; fi
50 if test -f /etc/kernel/postrm.d/zz-lilo; then
51 rm -f /etc/kernel/postrm.d/zz-lilo; fi
52 if test -f /etc/initramfs/post-update.d/lilo; then
53 rm -f /etc/initramfs/post-update.d/lilo; fi
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.