#!/bin/sh
### BEGIN INIT INFO
# Provides:          chkboot
# Required-Start:    $remote_fs
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Check for changes made to the boot partition
### END INIT INFO

set -e

. /lib/lsb/init-functions

case "$1" in
    stop|status)
        # chkboot isn't a daemon
    ;;
    start|force-reload|restart|reload)
        log_action_begin_msg "Checking bootfiles"
        if /usr/lib/chkboot/chkboot-bootcheck; then
            log_action_end_msg 0
        else
            log_action_end_msg $?
        fi
        ;;
    *)
        echo 'Usage: /etc/init.d/chkboot {start|reload|restart|force-reload|stop|status}'
        exit 3
        ;;
esac
