#!/bin/sh

set -e

# Use debconf.
. /usr/share/debconf/confmodule

# nothing to do in here if we aren't called with configure
if [ "$1" != configure ]; then
        exit 0
fi

[ -e /usr/share/debconf/confmodule ] && {
        db_get pconsole/setuid
        setuid="$RET"
}

if ! dpkg-statoverride --list /usr/libexec/pconsole/pconsole >/dev/null ; then
        if [ "$setuid" = "true" ] ; then
                chmod 4755 /usr/libexec/pconsole/pconsole
        elif [ "$setuid" = "false" ] ; then
                chmod 0755 /usr/libexec/pconsole/pconsole
        fi
fi

db_go || true
db_stop

#DEBHELPER#

exit 0
