Skip to content

Commit

Permalink
close rear#75
Browse files Browse the repository at this point in the history
press 'y' to continue or wait for the timeout (defaults to 30 seconds).
This was written on explicit demand of the operators who are nervous while doing DP restores and hitting too much on the keyboard ;-)
As a result, sometimes nothing was restored if the GUI script came along (as a keypress quits the script)
  • Loading branch information
gdha authored and dagwieers committed Jun 7, 2013
1 parent 00820b1 commit e4139e0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions usr/share/rear/restore/DP/default/46_press_y_to_continue.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
c_esc="\033"
Left () {
echo -ne ${c_esc}[${1}D
}

unset REPLY
echo -ne "Press \"y\" to continue or wait for timeout [30 secs]: "
while true
do
read -t 30 -r -n 1
rc=$?
(( $rc == 142 )) && break
case $REPLY in
y|Y) break ;;
*) Left 1 ; continue ;;
esac
done
echo

0 comments on commit e4139e0

Please sign in to comment.