#!/bin/sh

set -e

case "$1" in
    configure)
        AMDVGA0300=`lspci -d 1002::0300 | wc -l`
        AMDVGA0302=`lspci -d 1002::0302 | wc -l`
        AMDVGA0380=`lspci -d 1002::0380 | wc -l`
        AMDVGA_NUMBER=$(($AMDVGA0300 + $AMDVGA0302 + $AMDVGA0380))

        if [ "$AMDVGA_NUMBER" = "0" ]; then
            echo "No AMD VGA found !! cat-proc-asound-after-resume.service won't be enabled"
            exit 0
        fi

        systemctl enable cat-proc-asound-after-resume.service
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0
