diff --git a/rpi/sanitize-for-image.sh b/rpi/sanitize-for-image.sh index 58481cb..512e1f6 100755 --- a/rpi/sanitize-for-image.sh +++ b/rpi/sanitize-for-image.sh @@ -104,6 +104,8 @@ fi echo "" if [ "$AUTO_REBOOT" = false ]; then + # Flush input buffer before prompt + read -t 0.1 -n 10000 discard /dev/null || true read -p "Continue? This cannot be undone! [y/N] " -n 1 -r /dev/null || true + sleep 0.3 read -p "Reboot now? [y/N] " -n 1 -r /dev/null || true + sleep 0.3 read -p "Shut down now? [y/N] " -n 1 -r