backup-fs: attempt to fix not properly taking input on shutdown
parent
257f70ebe8
commit
48f01de830
|
@ -3,7 +3,8 @@
|
||||||
function yesno {
|
function yesno {
|
||||||
unset DISCARD_ME
|
unset DISCARD_ME
|
||||||
while [ -z "$DISCARD_ME" ]; do
|
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
|
case "$DISCARD_ME" in
|
||||||
y)
|
y)
|
||||||
return 0
|
return 0
|
||||||
|
@ -24,14 +25,14 @@ function yesno {
|
||||||
cat /proc/mounts
|
cat /proc/mounts
|
||||||
|
|
||||||
read -p "
|
read -p "
|
||||||
press any key" -n1 DISCARD_ME
|
press any key" -n1 DISCARD_ME < /dev/tty
|
||||||
|
|
||||||
# And no services running?
|
# And no services running?
|
||||||
|
|
||||||
ps aux | grep -vF "[kworker"
|
ps aux | grep -vF "[kworker"
|
||||||
|
|
||||||
read -p "
|
read -p "
|
||||||
press any key" -n1 DISCARD_ME
|
press any key" -n1 DISCARD_ME < /dev/tty
|
||||||
|
|
||||||
#TODO: remove above debugging sanity checks
|
#TODO: remove above debugging sanity checks
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue