diff --git a/opt/backup-fs b/opt/backup-fs index 328946f..9db16b2 100644 --- a/opt/backup-fs +++ b/opt/backup-fs @@ -3,7 +3,8 @@ function yesno { unset DISCARD_ME while [ -z "$DISCARD_ME" ]; do - read -p "[y/n] " -n1 DISCARD_ME + # get input from /dev/tty to work around missing stdin + read -p "[y/n] " -n1 DISCARD_ME < /dev/tty case "$DISCARD_ME" in y) return 0 @@ -24,14 +25,14 @@ function yesno { cat /proc/mounts read -p " -press any key" -n1 DISCARD_ME +press any key" -n1 DISCARD_ME < /dev/tty # And no services running? ps aux | grep -vF "[kworker" read -p " -press any key" -n1 DISCARD_ME +press any key" -n1 DISCARD_ME < /dev/tty #TODO: remove above debugging sanity checks