diff --git a/src/hook-check-bootdir-mounted.sh b/src/hook-check-bootdir-mounted.sh index 452e8946fe871c7ecae4ec0410faf46f0b905b33..0636a6ae1ff5f38388c3800f0913490956acfefd 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 $?