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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
#!/bin/sh
# postinst script for chkboot
set -e
case "$1" in
configure)
# On upgrade
if [ -n "$2" ]; then
# For version <= 1.3-2
if dpkg --compare-versions "$2" le "1.3-2"; then
# Update permission to match package one.
# See #192981
if [ -x /etc/profile.d/chkboot-profilealert.sh ]; then
chmod 644 /etc/profile.d/chkboot-profilealert.sh
fi
fi
fi
;;
triggered)
# This file trigger an update in the apt hook
touch "/var/lib/chkboot/needs-update" || true
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
# On upgrade, after rm_conffiles, remove emtpy directories
# See #665797
if [ "$1" = "configure" ]; then
if [ -n "$2" ]; then
if dpkg --compare-versions "$2" le "1.3-4"; then
if [ -d /etc/kernel/postinst.d ]; then
rmdir --ignore-fail-on-non-empty /etc/kernel/postinst.d
fi
if [ -d /etc/kernel/postrm.d ]; then
rmdir --ignore-fail-on-non-empty /etc/kernel/postrm.d
fi
fi
fi
fi
exit 0
|