This file is indexed.

postinst is in lilo 1:23.2-2.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/sh
# postinst script lilo
#
# see: dh_installdeb(1)

set -e

LNKS="sarge sid"

if [ -f /usr/share/debconf/confmodule ]; then
  . /usr/share/debconf/confmodule
fi

# remove old-named config files
dpkg-maintscript-helper rm_conffile \
  /etc/kernel/postinst.d/zz-lilo  1:22.8-10 lilo -- "$@"

dpkg-maintscript-helper rm_conffile \
  /etc/kernel/postrm.d/zz-lilo    1:22.8-10 lilo -- "$@"

dpkg-maintscript-helper rm_conffile \
  /etc/kernel/postinst.d/zz-lilo  1:22.8-10 lilo -- "$@"

dpkg-maintscript-helper rm_conffile \
  /etc/initramfs/post-update.d/lilo  1:22.8-10 lilo -- "$@"


# targets: configure|abort-upgrade|abort-remove|abort-deconfigure

case "$1" in
    configure|reconfigure)
    
	# if a new install then we create the link and exit
	if grep -q "^# UNCONFIGURED FSTAB FOR BASE SYSTEM" /etc/fstab ; then
	  exit 0
	fi

	# Check whether /boot is on another partition and mount it. See Bug#216250
	if grep "[[:space:]]/boot[[:space:]]" /etc/fstab | grep -vq "^#"; then
	   if ! grep -q "[[:space:]]/boot[[:space:]]" /etc/mtab ; then
	   	mount /boot 2>&1 > /dev/null

		if [ $? -ne 0 ]; then
			echo
			echo "WARNING: /boot is in another partition but could not be mounted."
			echo "LILO may fail in the next steps!"
		fi
	   fi
	fi

	# copy all background images to the right place
	if [ -L /boot/debian.bmp ]; then
		rm -f /boot/debian.bmp; fi

	install -m 0644  /usr/share/lilo/*.bmp  /boot
	# stay compatible with old lilo 22.8
	for i in ${LNKS}; do
		ln -s debian.bmp /boot/${i}.bmp
	done

	# Nasty part to create network block devices if needed. Bug#235805.
	if [ `uname -r | sed -e 's/-.*//g' -ne 's/\(^[0-9]\{1\}\.[0-9]\{1,2\}\).*/\1/p'` = "2.6" ] && \
	   [ `uname -r | sed -e 's/-.*//g' -ne 's/.*\.\([0-9]\{1,3\}\).*/\1/p'` -ge "3" ]; then

	  garbage=$(cat /proc/partitions | sed -ne 's/^[ \t]*//pg' | sed -ne '/^43/p')

	  if [ x"$garbage" != "x" ]; then
		# Create the missing devices
		echo -n "Creating network block devices... "
		(cd /dev; ./MAKEDEV nb) > /dev/null
		echo "done."  
	  fi
	fi

	db_get lilo/add_large_memory || true;
	if [ x"$RET" = x"true" -a -e /etc/lilo.conf ]; then
		if ! grep -q "^[[:space:]]*large-memory" /etc/lilo.conf; then
			sed -i -e '1i\# Automatically added by lilo postinst script\nlarge-memory\n' /etc/lilo.conf
			echo "WARNING: Added option 'large-memory', please run 'lilo' before you reboot."
		fi
	fi

	db_get lilo/diskid_uuid || true;
	if [ x"$RET" = x"true" -a -e /etc/lilo.conf ]; then
		if [ `grep -c -E "dev/disk/by-|UUID=" /etc/lilo.conf` -lt 2 ]; then
		  if test -x /usr/sbin/lilo-uuid-diskid; then
		    lilo-uuid-diskid
		    echo "WARNING: If boot / root options were converted, please run 'lilo' before you reboot."
		  fi
		fi
	fi

	db_get lilo/runme || true;
	if [ x"$RET" = x"true" ]; then
		echo "Running lilo..."
		lilo -H
	fi

	;;
	abort-upgrade|abort-remove|abort-deconfigure)
	;;

	*)
		echo "postinst called with unknown argument \`$1'" >&2
		exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
	update-menus
fi
# End automatically added section


exit 0