#!/bin/sh

# This script is normally not invoked
# It has special on-shot function in case of downgrading package unipi-os-configurator-data
# Script is activated from postrm script by renaming it to *.sh


if [ -e "/boot/unipi-patron.dtb.kernel" ] && ! [ -e "/boot/unipi-patron.dtb" ]; then
    dpkg-divert --rename --remove /boot/unipi-patron.dtb || true
fi
rm -f /opt/unipi/os-configurator/run.d/10-fix-divert.sh || true
