backup-fs: attempt to fix not properly taking input on shutdown
parent
257f70ebe8
commit
48f01de830
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue