File: apparmor.preinst

package info (click to toggle)
apparmor 2.13.6-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 28,604 kB
  • sloc: python: 18,892; ansic: 17,618; perl: 11,105; sh: 10,465; cpp: 5,413; yacc: 1,950; makefile: 1,729; lex: 1,105; pascal: 1,097; ruby: 374; exp: 250; java: 212; xml: 159
file content (27 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (6)
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
#!/bin/sh
# preinst script for apparmor
#
# see: dh_installdeb(1)
set -e

case "$1" in
    install|upgrade|abort-upgrade)
        # Remove old click/snapv1 state files on upgrade (dpkg will remove the
        # directories)
        if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "2.12-4ubuntu2"; then
            rm -f /var/lib/apparmor/profiles/.*.md5sums
        fi
	;;

    *)
        echo "preinst called with unknown argument \`$1'" >&2
        exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0