postinst is in initramfs-tools 0.122ubuntu8.14.
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 | #!/bin/sh
set -e
# Regenerate initramfs whenever we go to dpkg state `installed'
if [ "x$1" != xtriggered ]; then
# this activates the trigger, if triggers are working
update-initramfs -u
else
# force it to actually happen
DPKG_MAINTSCRIPT_PACKAGE='' update-initramfs -u
fi
# Remove all initrd old dkms files for which there is no
# corresponding initram image in /boot (LP: #1791959).
# One shot only:
# - bug only affected users that were upgrading packages
# - new users are not affected
# - LP: #1515513 took care of removing old dkms together with the kernel
if [ "x$1" = xconfigure ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.122ubuntu8.13"; then
for old_dkms_file in /boot/initrd-*.img.old-dkms \
/boot/initramfs-*.img.old-dkms \
/boot/initrd.img-*.old-dkms \
/boot/initrd-*.old-dkms; do
if [ ! -e "${old_dkms_file%%.old-dkms}" ]; then
rm -fv "${old_dkms_file}"
fi
done
fi
|