postinst is in initramfs-tools-ubuntu-touch 0.94vivid5.
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 | #!/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 fixrtc 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
if grep -q "^# UNCONFIGURED FSTAB FOR BASE SYSTEM" /etc/fstab; then
cp /usr/share/initramfs-tools-ubuntu-touch/fstab /etc/
fi
# move bits out of the way that make our initrd to big
apply_diversions
fi
|