#!/bin/sh
set -e

case "$1" in
    configure)
        # AUTOMATICALLY GENERATED POST-INSTALL CODE


        if command -v update-initramfs > /dev/null; then
            update-initramfs -u -k all
        # elif command -v dracut > /dev/null; then
        #     dracut --regenerate-all
        # elif command -v mkinitcpio > /dev/null; then
        #     mkinitcpio -P
        else
            echo "Couldn't update initramfs:" >&2
            # echo "Expected update-initramfs, dracut or mkinitcpio" >&2
            echo "Expected update-initramfs" >&2
            exit 1
        fi
        # END OF AUTOMATICALLY GENERATED POST-INSTALL CODE

    ;;

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

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

exit 0
