3
0
Fork
You've already forked boot_bless
0
A simple tool to check the integrity of the booted system and take appropriate steps in the case of a failed boot.
  • Shell 100%
Rose Hellsing 319354ce2b dist/init: remove supervise-daemon
boot_bless doesn't run as a daemon, making it run through supervise-daemon causes openrc to relaunch it multiple times
2026年02月09日 02:11:49 +01:00
dist dist/init: remove supervise-daemon 2026年02月09日 02:11:49 +01:00
usr/bin Fix quoted find paths 2026年02月08日 23:33:54 +01:00
.gitignore boot_bless: Add initial version of boot_bless 2026年02月08日 20:14:43 +01:00
boot_bless.conf boot_bless: Add initial version of boot_bless 2026年02月08日 20:14:43 +01:00
COPYING boot_bless: Add initial version of boot_bless 2026年02月08日 20:14:43 +01:00
README.md Add option to skip scripts 2026年02月08日 22:03:53 +01:00

boot_bless

A simple tool to check the integrity of the booted system and take appropriate steps in the case of a failed boot.

Configuration

boot_bless can be configured through the file /etc/boot_bless.d/boot_bless.conf:

TMPDIR="/tmp" # An alternative temporary directory. Preferrably a truly temporary (i.e. tmpfs) directory
REQUIRED_CHECK_DIRS="/etc/boot_bless.d/required" # Directories containing required checks
OPTIONAL_CHECK_DIRS="/etc/boot_bless.d/optional" # Directories containing optional checks
SUCCESS_BOOT_DIRS="/etc/boot_bless.d/success" # Directories containing scripts to execute on a successfull boot
FAILED_BOOT_DIRS="/etc/boot_bless.d/failed" # Directories containing scripts to execute on a failed boot
MOTD_FILE="/etc/motd" # Path to the motd. If the motd should not be modified, set this to /dev/null
LOGGERARGS="--id='boot_bless'" # Extra arguments to pass to logger(1)
LOGFILE="/var/log/boot_bless" # Path to the logfile
SKIP_SCRIPTS="" # Exact filenames of scripts to skip

All options are optional, and will default to the value shown in the example config above. The DIRS options may contain paths to multiple directories seperated by spaces.

Required checks

Required checks may NOT fail to be counted as successfull. If a script fail the boot will be marked as RED/failed.

Optional checks

Optional checks may fail, if an optional script fails the boot will be marked as YELLOW/unstable.

Success scripts

These scripts will be executed if required checks did not fail. While they should not fail, boot_bless will only log their exit codes and ignore script failure.

Fail scripts

These scripts will be executed if required checks fail. While they should not fail, boot_bless will only log their exit codes and ignore script failure.

Checking the boot status

boot_bless writes the status to ${TMPDIR}/.boot_bless_status. It can be read as a regular file or using boot_bless status. boot_bless will also append the boot status to the motd file defined in the config file.

Integrating with the system

boot_bless works best when started by the init system as the last service. View dist/ for an example openrc init script and various required/optional/success/failed scripts.

Logging

boot_bless will log using logger(1) if it was found in PATH, the arguments contained in LOGGERARGS will be added to the command. If logger(1) was not found in the system, log messages will simple be concatenated to the file specified in LOGFILE.