preinst is in watchdog 5.13-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 | #!/bin/sh
set -e
if [ -f /var/lib/dpkg/info/watchdog.prerm ]; then
# fix that old nasty reboot-on-upgrade bug
if [ `grep "/etc/init.d/watchdog stop" /var/lib/dpkg/info/watchdog.prerm >/dev/null` ]
then
sed -e 's%/etc/init.d/watchdog stop%# do not stop watchdog here /etc/init.d/watchdog stop%' < /var/lib/dpkg/info/watchdog.prerm > /var/lib/dpkg/info/watchdog.prerm.new &&
mv /var/lib/dpkg/info/watchdog.prerm.new /var/lib/dpkg/info/watchdog.prerm
fi
fi
|