postinst is in loggedfs 0.5-0ubuntu2.
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 | #!/bin/sh
set -e
CONFIGFILE=/etc/default/loggedfs
# Source debconf library.
. /usr/share/debconf/confmodule
case "$1" in
    configure|reconfigure) # reconfigure (cf man debconf_devel)
        # Change CONFIGFILE taking debconf results
        if [ ! -e "$CONFIGFILE" ] ; then
            echo "WARNING: $CONFIGFILE not present on your system. This will \
prevent loggedfs to run as a daemon. If you desire so, please reinstall your \
package (with apt-get --reinstall ...)"
            # file present: configure it
        else
            . $CONFIGFILE
            db_get loggedfs/start_default
            if [ "$RET" = "true" ] ; then
                RUN=yes
            else
                RUN=no
            fi
            db_get loggedfs/use_syslog
            if [ "$RET" = "true" ] ; then
                USE_SYSLOG=yes
            else
                USE_SYSLOG=no
            fi
            db_get loggedfs/audit_path
            AUDIT_DIR="$RET"
            # If the admin deleted or commented some variables but then set
            # them via debconf, (re-)add them to the conffile.
            test -z "$RUN" || grep -Eq '^ *RUN=' $CONFIGFILE || \
                echo "RUN=$RUN" >> $CONFIGFILE
            test -z "$USE_SYSLOG" || grep -Eq '^ *USE_SYSLOG=' $CONFIGFILE || \
                echo "USE_SYSLOG=$USE_SYSLOG" >> $CONFIGFILE
            test -z "$AUDIT_DIR" || grep -Eq '^ *AUDIT_DIR=' $CONFIGFILE || \
                echo "AUDIT_DIR=$AUDIT_DIR" >> $CONFIGFILE
            # We are confident that there is a variable in CONFIGFILE.tmp there
            sed -e "s/^ *RUN=.*/RUN=$RUN/" \
                -e "s/^ *USE_SYSLOG=.*/USE_SYSLOG=$USE_SYSLOG/" \
                -e "s#^ *AUDIT_DIR=.*#AUDIT_DIR=$AUDIT_DIR#" $CONFIGFILE > $CONFIGFILE.tmp
            mv -f $CONFIGFILE.tmp $CONFIGFILE
        fi
        # Stop debconf (because we may launch a daemon and debconf
        # will not detect the end of postinst)
        db_stop
    ;;
    abort-upgrade|abort-remove|abort-deconfigure)
    ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/loggedfs" ]; then
	update-rc.d loggedfs start 20 2 3 4 5 . stop 80 1 . >/dev/null
	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
		invoke-rc.d loggedfs start || exit $?
	else
		/etc/init.d/loggedfs start || exit $?
	fi
fi
# End automatically added section
exit 0
 |