postinst is in initramfs-tools-ubuntu-core 0.7.43.
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 | #!/bin/sh
set -e
apply_diversions()
{
DIR=/usr/share/initramfs-tools
SUBDIRS="hooks scripts/local-premount scripts/init-top scripts/init-bottom scripts/panic"
FILES="compcache dmsetup plymouth console_setup kbd thermal"
for file in $FILES; do
for subdir in $SUBDIRS; do
if [ -e $DIR/$subdir/$file ]; then
diversion="$file.$(echo $subdir|sed -e 's/scripts\///'|sed -e 's/-/./').diverted"
dpkg-divert --add --local --divert $DIR/$diversion --rename $DIR/$subdir/$file >/dev/null 2>&1 || true
fi
done
done
}
if [ "$1" = "configure" ]; then
# move bits out of the way that make our initrd to big
apply_diversions
fi
|