#!/bin/sh

set -e

. ./debian/tests/chkboot-testing-lib

case "$AUTOPKGTEST_REBOOT_MARK" in
    "")
        setup_chkboot

        echo "assert initial state"
        chkboot-check

        echo "creating new file in /boot"
        echo "content" > /boot/new

        echo "rebooting"
        /tmp/autopkgtest-reboot mark1
        ;;

    mark1)
        echo "assert state after reboot with unacknowledged changes"
        ! chkboot-check
        ;;
esac
echo "test end"
