preinst is in ferm 2.4-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 12 13 14 15 16 17 18 19 20 21 | #!/bin/sh
set -e
action=$1
version=$2
if [ "$action" = upgrade ]; then
# remove old cache files
rm -f /var/cache/ferm/*.sh /var/cache/ferm/*.tmp
fi
if [ "$action" = upgrade -a -n "$version" ]; then
if dpkg --compare-versions "$version" lt "1.1.1" &&
dpkg --compare-versions "$version" gt "1.1-1"; then
# upgrade from the 1.2 alpha ("1.1+svnXX") releases
# this flag has been obsoleted, it is now a variable in
# /etc/default/ferm
rm -f /etc/ferm/disabled_on_bootup
fi
fi
|