preinst is in libapache2-mod-apparmor 2.10.95-0ubuntu2.
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 30 | #!/bin/sh
# preinst script for libapache2-mod-apparmor
#
# see: dh_installdeb(1)
set -e
APP_PROFILE="usr.sbin.apache2"
APP_CONFFILE="/etc/apparmor.d/$APP_PROFILE"
APP_DISABLE="/etc/apparmor.d/disable/$APP_PROFILE"
if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
# Disable AppArmor profile on install or upgrade from earlier than when we
# first shipped the profile if the user does not already have a profile
# defined
if dpkg --compare-versions "$2" lt 2.8.0-0ubuntu21 ; then
if [ ! -e "$APP_CONFFILE" ]; then
mkdir -p `dirname $APP_DISABLE` 2>/dev/null || true
ln -sf $APP_CONFFILE $APP_DISABLE
fi
fi
fi
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/apparmor.d/usr.lib.apache2.mpm-prefork.apache2 2.8.0-0ubuntu21~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/apparmor.d/local/usr.lib.apache2.mpm-prefork.apache2 2.8.0-0ubuntu21~ -- "$@"
# End automatically added section
exit 0
|