This file is indexed.

postinst is in grub 0.97-29ubuntu66.

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
#!/bin/sh

if [ "$1" = "configure" ]; then
	if dpkg --compare-versions "$2" lt-nl "0.97-29ubuntu6"; then
		update-grub
	fi
	if dpkg --compare-versions "$2" lt "0.97-29ubuntu26"; then
		# This is an old misnamed config file we need to get rid of
		rm -f /etc/event.d/event.d-last-good-boot
	fi
	if dpkg --compare-versions "$2" lt "0.97-29ubuntu38"; then
		# Remnants of when this was default
		rm -rf /boot/last-good-boot /lib/modules/last-good-boot
	fi

        if egrep -q '^[[:space:]]*post(inst|rm)_hook[[:space:]]*=[[:space:]]*(/sbin/|/usr/sbin/)?update-grub' /etc/kernel-img.conf 2>/dev/null; then
            echo 'Removing update-grub hooks from /etc/kernel-img.conf in favour of' >&2
            echo '/etc/kernel/ hooks.' >&2
            sed -ri /etc/kernel-img.conf -e '\%^[[:space:]]*post(inst|rm)_hook[[:space:]]*=[[:space:]]*(/sbin/|/usr/sbin/)?update-grub%d'
            update-grub
        fi
fi

if [ "x$1" = xtriggered ] ; then
	/usr/sbin/update-grub
fi

if [ "$1" = "configure" ]; then
	# Create a last-good-boot if one doesn't exist.
	/usr/sbin/kernel-helper -i
fi