File: chkboot.init

package info (click to toggle)
chkboot 1.3-8.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 288 kB
  • sloc: sh: 267; makefile: 31
file content (31 lines) | stat: -rw-r--r-- 718 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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/libexec/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