#!/bin/sh
set -e

case "$1" in
    remove|purge)
        if command -v udevadm >/dev/null 2>&1; then
            echo "Reloading udev rules after removing One ROM CLI..."
            udevadm control --reload-rules
            udevadm trigger --action=change
        fi
        ;;
    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
        ;;
    *)
        echo "postrm called with unknown argument \`$1'" >&2
        exit 1
        ;;
esac

exit 0