This file is indexed.

preinst is in sssd-common 1.16.1-1ubuntu1.

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh

set -e

# Remove a no-longer used conffile
# Copied from http://wiki.debian.org/DpkgConffileHandling
rm_conffile() {
    local PKGNAME="$1"
    local CONFFILE="$2"

    [ -e "$CONFFILE" ] || return 0

    local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
    local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \
            sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
    if [ "$md5sum" != "$old_md5sum" ]; then
        echo "Obsolete conffile $CONFFILE has been modified by you."
        echo "Saving as $CONFFILE.dpkg-bak ..."
        mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
    else
        echo "Removing obsolete conffile $CONFFILE ..."
        mv -f "$CONFFILE" "$CONFFILE".dpkg-del
    fi
}

APP_PROFILE="usr.sbin.sssd"
APP_CONFFILE="/etc/apparmor.d/$APP_PROFILE"
APP_COMPLAIN="/etc/apparmor.d/force-complain/$APP_PROFILE"
APP_DISABLE="/etc/apparmor.d/disable/$APP_PROFILE"

inst_complain_profile() {
    # Create a symlink to the yet-to-be-unpacked profile
    mkdir -p `dirname $APP_COMPLAIN` 2>/dev/null || true
    ln -sf $APP_CONFFILE $APP_COMPLAIN
}

case "$1" in
install)
    # Force the AppArmor profile to complain mode on install
    inst_complain_profile
    ;;
upgrade)
    if dpkg --compare-versions "$2" le "1.0.5-1"; then
        rm_conffile sssd "/etc/sssd/sssd.api.conf"
        rm_conffile sssd "/etc/sssd/sssd.api.d/sssd-proxy.conf"
        rm_conffile sssd "/etc/sssd/sssd.api.d/sssd-simple.conf"
        rm_conffile sssd "/etc/sssd/sssd.api.d/sssd-ipa.conf"
        rm_conffile sssd "/etc/sssd/sssd.api.d/sssd-local.conf"
        rm_conffile sssd "/etc/sssd/sssd.api.d/sssd-krb5.conf"
        rm_conffile sssd "/etc/sssd/sssd.api.d/sssd-ldap.conf"
    fi
    if dpkg --compare-versions "$2" lt "1.10.0~beta2-1"; then
	    inst_complain_profile
        if [ -e "$APP_DISABLE" ]; then
            rm -f "$APP_DISABLE"
        fi
    fi
    ;;
esac

# Automatically added by dh_installdeb/11.1.6ubuntu1
dpkg-maintscript-helper rm_conffile /etc/init/sssd.conf 1.15.3-3ubuntu1\~ -- "$@"
# End automatically added section