preinst is in logrotate 3.11.0-0.1ubuntu1.
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
set -e
if [ "$1" = "upgrade" ]; then
# Fix up the location of the state files that previous versions used.
if [ -f /var/state/logrotate/status ]; then
if [ -f /var/lib/logrotate/status ]; then
rm /var/state/logrotate/status
else
mkdir -m 755 -p /var/lib/logrotate
mv /var/state/logrotate/status /var/lib/logrotate/status
fi
rm -rf /var/state/logrotate
fi
if [ -f /var/lib/logrotate.status ]; then
if [ -f /var/lib/logrotate/status ]; then
rm /var/lib/logrotate.status
else
mkdir -m 755 -p /var/lib/logrotate
mv /var/lib/logrotate.status /var/lib/logrotate/status
fi
fi
fi
exit 0
|