Debian Codegraph @

debian/rsyslog.postinst

raw
1 #!/bin/sh
2
3 set -e
4
5 # summary of how this script can be called:
6 # * <postinst> `configure' <most-recently-configured-version>
7 # * <old-postinst> `abort-upgrade' <new version>
8 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
9 # <new-version>
10 # * <postinst> `abort-remove'
11 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
12 # <failed-install-package> <version> `removing'
13 # <conflicting-package> <version>
14 # for details, see http://www.debian.org/doc/debian-policy/ or
15 # the debian-policy package
16
17 case "$1" in
18 configure)
19 # Fix permissions of the spool/work directory (Bug: #693099)
20 chmod 700 /var/spool/rsyslog
21
22 if dpkg --compare-versions "$2" lt-nl "8.2110.0-2"; then
23 update-rc.d -f rsyslog remove || true
24 fi
25 ;;
26
27 triggered)
28 # Try to restart rsyslog
29 invoke-rc.d rsyslog try-restart || true
30 exit 0
31 ;;
32
33 abort-upgrade|abort-remove|abort-deconfigure)
34 ;;
35
36 *)
37 echo "postinst called with unknown argument \`$1'" >&2
38 exit 1
39 ;;
40 esac
41
42 #DEBHELPER#