diff options
author | Erich Eckner <git@eckner.net> | 2019-05-16 09:35:42 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-16 09:35:42 +0200 |
commit | 7ee74cc1d31c4d3e7bc8d8d65222fca96cc3a7ab (patch) | |
tree | 4eb6bdd3b56b723948a4a433a40608632e454562 /check-kernel.in | |
parent | ba6cb3fa1e6f22f6ecd76399af6fe34d00116f98 (diff) | |
download | check-kernel-0.5.1.tar.xz |
check-kernel.conf and reboot_check_hook() newv0.5.1
Diffstat (limited to 'check-kernel.in')
-rw-r--r-- | check-kernel.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/check-kernel.in b/check-kernel.in index c138152..d9c3717 100644 --- a/check-kernel.in +++ b/check-kernel.in @@ -46,6 +46,13 @@ while true; do shift done +if [ -f '#ETCDIR#/check-kernel.conf' ]; then + if ! . '#ETCDIR#/check-kernel.conf'; then + >&2 printf 'Sourcing "#ETCDIR#/check-kernel.conf" failed.\n' + exit 1 + fi +fi + unset installed if which pacman >/dev/null 2>&1; then # arch linux @@ -133,6 +140,11 @@ else "${installed}" \ "${running}" if ${reboot}; then + if declare -F reboot_check_hook >/dev/null \ + && ! reboot_check_hook; then + >&2 printf 'reboot_check_hook() failed.\n' + exit 1 + fi >&2 printf 'Press enter to reboot ...' read s if [ -z "${s}" ]; then |