#!/bin/bash
##############
# LMS postinst hook
##############

case "$1" in
    configure)
      mkdir -p /etc/lms
      udevadm control -R && udevadm trigger -c add
      # Load mei_wdt so /dev/iamt_watchdog exists before lms starts
      modprobe mei_wdt || true
      # Wait for udev to process the new watchdog device and create /dev/iamt_watchdog
      udevadm settle
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

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

#DEBHELPER#

exit 0
