postinst is in plymouth-disabler 0.1.
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
#
MY_MANUAL="manual # PLYMOUTH_DISABLER"
MY_MANUAL_REGEX="manual[ ]\+#[ ]*PLYMOUTH_DISABLER"
# dpkg -L plymouth | sed -n -e 's,.conf$,,' -e 's,/etc/init/,,p' | sort
PLYMOUTH_JOBS="plymouth plymouth-log plymouth-ready plymouth-splash
plymouth-stop plymouth-upstart-bridge"
set -e
if [ "$1" = "configure" ]; then
[ -d "/etc/init" ] || mkdir -p "/etc/init"
for job in $PLYMOUTH_JOBS; do
cfg="/etc/init/$job.conf.override"
[ -f "$cfg" ] && grep -q "$MY_MANUAL" "$cfg" &&
existing=true || existing=false
# first install or install after purge. clean out anything.
if [ -z "$1" -a "$existing" = "true" ]; then
sed -i "/${MY_MANUAL_REGEX}/d" "$cfg"
existing=false
fi
# only add the line if it wasn't there. to allow user to comment out.
if [ "$existing" = "false" ]; then
echo "$MY_MANUAL" >> "$cfg"
fi
done
fi
|