blob: 23cac280c444471eb0221e0ee2c23d4485b2e193 (
plain)
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
46
47
48
49
50
51
52
53
54
|
#!/bin/sh
# preinst script for lighttpd
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install)
;;
upgrade)
if [ "x$2" != "x" ]; then
# We upgrade from Squeeze or older, remove alternative as spawn-fcgi is not provided anymore.
# This should have been done since 1.4.26-1 but was accidentally forgotten
if dpkg --compare-versions "$2" lt 1.4.28-4
then
update-alternatives --remove spawn-fcgi /usr/bin/spawn-fcgi.lighttpd || true
update-alternatives --remove spawn-fcgi.1.gz /usr/share/man/man1/spawn-fcgi.lighttpd.1.gz || true
fi
fi
if dpkg --compare-versions "$2" le 1.4.32-1+dyson2; then
# Renaming SMF service:
if [ -x /usr/bin/smf_present ] && /usr/bin/smf_present ; then
svcadm -v disable -s svc:/network/lighttpd || true
fi
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
|