This file is indexed.

preinst is in logcheck-database 1.3.14.

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
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#!/bin/sh
# preinst script for logcheck-database
#
# see: dh_installdeb(1)

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


# List of conffiles which have been removed from this package.  These will be
# deleted (or backed away) at the next upgrade.
#
# Conffiles must be listed here from the very moment of their removal; adding
# them later on will not work correctly.  If you ever forget, you'll need to
# add them to OLD_CONFFILES below, instead.

REMOVED_CONFFILES="
	/etc/logcheck/ignore.d.server/webmin
	/etc/logcheck/ignore.d.server/cracklib
	/etc/logcheck/ignore.d.workstation/xscreensaver
	/etc/logcheck/ignore.d.server/ntop
	/etc/logcheck/ignore.d.server/oidentd
	/etc/logcheck/ignore.d.server/lpr
	/etc/logcheck/ignore.d.server/ntp
	/etc/logcheck/ignore.d.server/sendmail
	/etc/logcheck/violations.ignore.d/logcheck-bind
	/etc/logcheck/violations.ignore.d/logcheck-bluez-utils
	/etc/logcheck/violations.ignore.d/logcheck-courier
	/etc/logcheck/violations.ignore.d/logcheck-cron-apt
	/etc/logcheck/violations.ignore.d/logcheck-cyrus
	/etc/logcheck/violations.ignore.d/logcheck-dcc
	/etc/logcheck/violations.ignore.d/logcheck-dovecot
	/etc/logcheck/violations.ignore.d/logcheck-hylafax
	/etc/logcheck/violations.ignore.d/logcheck-innd
	/etc/logcheck/violations.ignore.d/logcheck-login
	/etc/logcheck/violations.ignore.d/logcheck-mon
	/etc/logcheck/violations.ignore.d/logcheck-nagios
	/etc/logcheck/violations.ignore.d/logcheck-openvpn
	/etc/logcheck/violations.ignore.d/logcheck-passwd
	/etc/logcheck/violations.ignore.d/logcheck-pdns
	/etc/logcheck/violations.ignore.d/logcheck-postfix
	/etc/logcheck/violations.ignore.d/logcheck-proftpd
	/etc/logcheck/violations.ignore.d/logcheck-pureftp
	/etc/logcheck/violations.ignore.d/logcheck-samba
	/etc/logcheck/violations.ignore.d/logcheck-sasl2-bin
	/etc/logcheck/violations.ignore.d/logcheck-saslauthd
	/etc/logcheck/violations.ignore.d/logcheck-sendmail_tmp
	/etc/logcheck/violations.ignore.d/logcheck-spamd
	/etc/logcheck/violations.ignore.d/logcheck-squid
	/etc/logcheck/violations.ignore.d/logcheck-ssh
	/etc/logcheck/violations.ignore.d/logcheck-usb
	/etc/logcheck/violations.ignore.d/logcheck-winbind
	/etc/logcheck/violations.ignore.d/logcheck-kernel
	/etc/logcheck/violations.ignore.d/logcheck-smartd
"

# List of conffiles which were once part of this package a long time ago, and
# have never been cleaned up properly.  They will be removed if they are still
# around, unclaimed, and match any specified MD5 checksum.
#
# Each line contains one filename, followed by one or many MD5 checksums, all
# separated by whitespace.  When adding files to this list,
# OLD_CONFFILES_VERSION needs to be bumped up to the current version.

OLD_CONFFILES_VERSION="1.3.4"
OLD_CONFFILES="
  /etc/logcheck/cracking.d/logcheck           9c8e91bc2932e10e5532802f0f5a86b8
  /etc/logcheck/violations.ignore.d/innd      d41d8cd98f00b204e9800998ecf8427e
  /etc/logcheck/violations.ignore.d/logcheck-amavisd-new \
                                              0a2d041f4332fbaf9d326515f8ff58f9
  /etc/logcheck/violations.ignore.d/logcheck-sendmail \
                                              96fa759987265ff75d9b92a24b063efd
  /etc/logcheck/violations.ignore.d/su        f53c65f2bfb33f8a15b7e00057821a68 \
                                              6687303d525925f82a82412b8d00bf86
  /etc/logcheck/ignore.d.paranoid/imap        38069d1aa006e84dafb61beffab594db
  /etc/logcheck/ignore.d.paranoid/proftpd     9e1f0d8fb64ce5edc8c47eaf720444fa \
                                              d41d8cd98f00b204e9800998ecf8427e
  /etc/logcheck/ignore.d.server/imapd-ssl     cd0953f2f26496b18d8e49febf529fd7
  /etc/logcheck/ignore.d.server/no-ip         b5d4f9a294cd9345060a3e21271d860d
  /etc/logcheck/ignore.d.server/pop3d-ssl     a88ce3eeca092bca762fbff0a985581e \
                                              3272d4f5b7edf11cf54650f457647eda
  /etc/logcheck/ignore.d.server/qmail         a5a4dd8847a88de8016a9c9474e0815f
  /etc/logcheck/ignore.d.server/thttpd        8db4836e6f8d11d6c14ef28a7a8682f3
  /etc/logcheck/ignore.d.workstation/anacron  242b74300ff0d1eff77dc25e41e101d1 \
                                              58213d4bae9c4a369eed8e73ec6efc27
  /etc/logcheck/ignore.d.workstation/cron-apt 882cd73511c42929d455a0092a43aa1b
  /etc/logcheck/ignore.d.workstation/mldonkey-server \
                                              1e55f75dc078aa4247943843f83b967c
  /etc/logcheck/ignore.d.workstation/pptpd    17b6447278d9561232c3796a7be300ea
"


# Copied from <http://wiki.debian.org/DpkgConffileHandling>
rm_conffile() {
    local PKGNAME="$1"
    local CONFFILE="$2"

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

    # Do nothing if that file no longer belongs to us
    dpkg-query --listfiles "$PKGNAME" | grep -q "^$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 ..."
        rm -f "$CONFFILE"
    fi
}

# Delete an old forgotten conffile if it's still around and unclaimed, and
# matches one of any MD5 checksums.  If no checksum matches, it will be
# backed up and move aside.
rm_old_conffile() {
    local PKGNAME="$1"
    local CONFFILE="$2"
    shift 2

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

    # Leave that file alone if it now belongs to another package
    dpkg-query --search "$CONFFILE" >/dev/null 2>&1 && return 0

    local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
    for OLD_MD5SUM in "$@"; do
        if [ "$md5sum" = "$OLD_MD5SUM" ]; then
            echo "Removing obsolete conffile $CONFFILE ..."
            rm -f "$CONFFILE"
            return
        fi
    done

    echo "Obsolete conffile $CONFFILE has been modified by you."
    echo "Saving as $CONFFILE.dpkg-bak ..."
    mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
}


case "$1" in
    install|upgrade)
        # Remove $REMOVED_CONFFILES on upgrade, or when re-installing
        # after the package was removed (but not purged).
        if [ "$2" ]; then
            for CONFFILE in $REMOVED_CONFFILES; do
                rm_conffile logcheck-database "$CONFFILE"
            done
        fi

        # Remove $OLD_CONFFILES on a new install, or when upgrading
        # from an old version.
        if dpkg --compare-versions "$2" lt "$OLD_CONFFILES_VERSION"; then
            echo "$OLD_CONFFILES" | while read CONFFILE MD5SUMS; do
                if [ "$2" ]; then
		    # It's actually quite possible that the file still
		    # "belongs" to us, and that we can avoid a costly call to
		    # dpkg-query --search.
                    rm_conffile logcheck-database "$CONFFILE"
                fi

                rm_old_conffile logcheck-database "$CONFFILE" $MD5SUMS
            done
        fi
    ;;

    abort-upgrade)
    ;;

    *)
        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.



exit 0