Added a confirmation prompt to -plug_test controlled write runs

This commit is contained in:
Thomas Schmitt 2019-11-30 17:26:18 +01:00
parent b0db123119
commit 69ce40b6d4
1 changed files with 13 additions and 1 deletions

View File

@ -240,7 +240,7 @@ plug_in_watcher() {
# <<< Mock-up to save USB socket wear-off by erasing items from old_device_list
# <<< Their presence in new_device_list will let them appear as fresh plugs
# old_device_list=' '$($lsblk_cmd -d -n -o NAME | grep -v '^sr[0-9]' | grep -v '^fd[0-9]' | tr '\n\r' ' ' | sed -e 's/sd[e-f]//')' '
# old_device_list=' '$(echo -n $old_device_list | sed -e 's/sd[e-f]//')' '
echo "Found and noted as _not_ desired: $old_device_list"
echo
@ -580,6 +580,18 @@ then
then
if test -n "$image_file"
then
if test -n "$do_plug_test"
then
echo
echo "Step 3:"
if test -n "$dummy_run"
then
echo "This would be the last chance to abort. Press Enter to see -dummy report."
else
echo "Last chance to abort. Press Enter to start REAL WRITING."
fi
read dummy
fi
write_image "$image_file" $candidates
exit $?
else