Made changes to -plug_test step 3
This commit is contained in:
@ -252,13 +252,15 @@ plug_in_watcher() {
|
||||
echo >&2
|
||||
echo "Step 1:" >&2
|
||||
echo "Please make sure that the desired target device is plugged _out_ now." >&2
|
||||
echo "If it is currently plugged in, make sure to unmount all its fileystems" >&2
|
||||
echo "and then unplug it." >&2
|
||||
echo "Press the Enter key when ready." >&2
|
||||
read dummy
|
||||
old_device_list=' '$($lsblk_cmd -d -n -o NAME | grep -v '^sr[0-9]' | grep -v '^fd[0-9]' | tr '\n\r' ' ')' '
|
||||
|
||||
# <<< 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=' '$(echo -n $old_device_list | sed -e 's/sd[e-f]//')' '
|
||||
# old_device_list=' '$(echo -n $old_device_list | sed -e 's/sde//')' '
|
||||
|
||||
echo "Found and noted as _not_ desired: $old_device_list" >&2
|
||||
echo >&2
|
||||
@ -653,11 +655,18 @@ then
|
||||
echo "Step 3:" >&2
|
||||
if test -n "$dummy_run"
|
||||
then
|
||||
echo "This would be the last chance to abort. Press Enter to see -dummy report." >&2
|
||||
echo "This would be the last chance to abort. Enter the word 'yes' to see -dummy report." >&2
|
||||
else
|
||||
echo "Last chance to abort. Press Enter to start REAL WRITING." >&2
|
||||
echo "Last chance to abort. Enter the word 'yes' to start REAL WRITING." >&2
|
||||
fi
|
||||
read dummy
|
||||
if test "$dummy" = "yes" -o "$dummy" = "'yes'" -o "$dummy" = '"yes"'
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
echo "WRITE RUN PREVENTED by user input '$dummy'." >&2
|
||||
exit 12
|
||||
fi
|
||||
fi
|
||||
write_image "$image_file" $candidates
|
||||
exit $?
|
||||
|
Reference in New Issue
Block a user