preinst is in maas-provision 2.2.2-0ubuntu4.
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 | #!/bin/sh
set -e
# Enable the apparmor profile by default (LP: #987265)
if [ "$1" = "upgrade" ] \
&& dpkg --compare-versions "$2" lt "2.2.2-0ubuntu3" \
&& [ -f "/etc/apparmor.d/disable/usr.bin.cobblerd" ] \
&& aa-status --enabled 2>/dev/null; then
rm -f /etc/apparmor.d/disable/usr.bin.cobblerd
apparmor_parser -r -T -W /etc/apparmor.d/usr.bin.cobblerd || true
fi
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/cobbler" ] && [ ! -L "/etc/init.d/cobbler" ]; then
if [ "`md5sum \"/etc/init.d/cobbler\" | sed -e \"s/ .*//\"`" != \
"`dpkg-query -W -f='${Conffiles}' maas-provision | sed -n -e \"\\\\' /etc/init.d/cobbler '{s/ obsolete$//;s/.* //p}\"`" ]
then
echo "Obsolete conffile /etc/init.d/cobbler has been modified by you, renaming to .dpkg-bak"
mv -f "/etc/init.d/cobbler" "/etc/init.d/cobbler.dpkg-bak"
else
rm -f "/etc/init.d/cobbler"
fi
fi
fi
# End automatically added section
|