#!/bin/sh -e
#DEBHELPER#

for PMDA in dm nfsclient openmetrics ; do
    if ! grep -q "$PMDA/pmda$PMDA" /etc/pcp/pmcd/pmcd.conf
    then
        if test -d "/var/lib/pcp/pmdas/$PMDA"
        then
            touch "/var/lib/pcp/pmdas/$PMDA/.NeedInstall"
        fi
    fi
done

# auto-enable these usually optional pmie rules
pmieconf -c enable dmthin
