postinst is in autofs 5.0.7-3ubuntu3.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/bin/sh
set -e
if [ "$1" = "configure" ]; then
for file in auto.master auto.net auto.misc auto.smb default/autofs; do
# transfer ownership from old autofs5 package
case "`ucfq -w /etc/$file`" in
*:autofs5:*) force=--force ;;
*) force= ;;
esac
ucfr $force autofs /etc/$file
ucf /usr/share/autofs/conffiles/$file /etc/$file
done
fi
# In version 5.0.6 (wheezy), the package has been renamed
# from autofs5 to autofs. We properly Breaks/Replaces the old package,
# and dummy/transitional `autofs5' is also provided, so regular upgrades
# and new installs works. But when a system had old autofs5 installed
# and the user installs new autofs manually, the system ends up having
# config files of old autofs5, together with maintainer scripts, and
# this new autofs package. We need to ensure that old autofs5 package
# can be purged, but its maintscripts tries to deregister/remove
# ucf-controlled files, -- the same as we maintain above. We must stop
# it from doing so, and the only way we currently know to do that is to
# REMOVE old package's maintscripts to stop it from being executed.
# Suggested by Ben Hutchings and Steve Langasek. #686146
if [ "$1" = configure ]; then
if postrm="$(dpkg-query -c autofs5 postrm 2>/dev/null)" && [ -n "$postrm" ]
then
rm -f "$postrm"
fi
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/autofs" ] || [ -e "/etc/init/autofs.conf" ]; then
if [ ! -e "/etc/init/autofs.conf" ]; then
update-rc.d autofs start 19 2 3 4 5 . stop 81 0 1 6 . >/dev/null
fi
invoke-rc.d autofs start || exit $?
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f autofs remove >/dev/null || exit $?
# End automatically added section
|