#!/bin/sh

set -e

. /usr/share/debconf/confmodule

case "$1" in
    remove|purge)
        if [ -e /etc/camera/ipu75xa/sensors/ov08x40-uf.json ]; then
            rm /etc/camera/ipu75xa/sensors/ov08x40-uf.json
            dpkg-divert --rename --remove /etc/camera/ipu75xa/sensors/ov08x40-uf.json
        fi
        rm -f /etc/default/grub.d/oem-flavour.cfg
        if [ -e /boot/grub/grub.cfg ] && command -v update-grub; then
            update-grub
        fi
    ;;
esac

#DEBHELPER#
