From d4f3772ff7393fa2f7a7802258d89bf7d05c9a1d Mon Sep 17 00:00:00 2001 From: Recolic Keghart <root@recolic.net> Date: Tue, 12 Oct 2021 02:06:56 +0800 Subject: [PATCH] enhanced --- src/hook-check-bootdir-mounted.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hook-check-bootdir-mounted.sh b/src/hook-check-bootdir-mounted.sh index 452e894..0636a6a 100755 --- a/src/hook-check-bootdir-mounted.sh +++ b/src/hook-check-bootdir-mounted.sh @@ -2,7 +2,13 @@ # This is the pre-transaction hook, to force user to check if /boot is mounted. # If there's no device mounted at /boot, generates an error. -mount | cut -d ' ' -f 3 | grep '^/boot$' > /dev/null +while true; do + mount | cut -d ' ' -f 3 | grep '^/boot$' > /dev/null && break + [[ $warned = 1 ]] || ! echo "Please mount /boot BEFORE upgrading kernel. Waiting for mounting..." >&2 || warned=1 + echo -n . + sleep 4 +done + exit $? -- GitLab