preinst is in openvswitch-switch 2.0.1+git20140120-0ubuntu2.
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 | #!/bin/sh
set -e
if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt "1.10.1+git20130823-0ubuntu1~"; then
# Stop openvswitch prior to upgrade as this version
# provides an upstart configuration instead.
invoke-rc.d openvswitch-switch stop
fi
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/openvswitch-switch" ] && [ -L "/etc/init.d/openvswitch-switch" ] \
&& [ $(readlink -f "/etc/init.d/openvswitch-switch") = /lib/init/upstart-job ]
then
rm -f "/etc/init.d/openvswitch-switch"
fi
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/openvswitch-force-reload-kmod" ] && [ -L "/etc/init.d/openvswitch-force-reload-kmod" ] \
&& [ $(readlink -f "/etc/init.d/openvswitch-force-reload-kmod") = /lib/init/upstart-job ]
then
rm -f "/etc/init.d/openvswitch-force-reload-kmod"
fi
fi
# End automatically added section
exit 0
|