mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 12:06:36 +02:00
offer user cancel on upload
This commit is contained in:
@@ -405,24 +405,30 @@ if [ ${mode} = "scb-import-gui" ]; then
|
|||||||
elif [ "${error}" == "not-found" ]; then
|
elif [ "${error}" == "not-found" ]; then
|
||||||
echo "!! WARNING !!"
|
echo "!! WARNING !!"
|
||||||
echo "There was no upload found in ${defaultUploadPath}"
|
echo "There was no upload found in ${defaultUploadPath}"
|
||||||
echo "Make sure you upload only one tar.gz-file and start again."
|
echo "PRESS ENTER to continue & retry ... or 'x'+ ENTER to cancel"
|
||||||
echo "PRESS ENTER to continue & retry"
|
read keyRetry
|
||||||
read key
|
|
||||||
elif [ "${error}" == "multiple" ]; then
|
elif [ "${error}" == "multiple" ]; then
|
||||||
echo "!! WARNING !!"
|
echo "!! WARNING !!"
|
||||||
echo "There are multiple lnd-rescue files in directory ${defaultUploadPath}"
|
echo "There are multiple lnd-rescue files in directory ${defaultUploadPath}"
|
||||||
echo "Make sure you upload only one tar.gz-file and start again."
|
echo "Make sure you upload only one tar.gz-file and start again."
|
||||||
echo "PRESS ENTER to continue & retry"
|
echo "PRESS ENTER to continue & retry ... or 'x'+ ENTER to cancel"
|
||||||
read key
|
read keyRetry
|
||||||
elif [ "${error}" == "invalid" ]; then
|
elif [ "${error}" == "invalid" ]; then
|
||||||
echo "!! WARNING !!"
|
echo "!! WARNING !!"
|
||||||
echo "The file uploaded is not a valid (complete upload failed or not correct file)."
|
echo "The file uploaded is not a valid (complete upload failed or not correct file)."
|
||||||
echo "PRESS ENTER to continue & retry"
|
echo "PRESS ENTER to continue & retry ... or 'x'+ ENTER to cancel"
|
||||||
read key
|
read keyRetry
|
||||||
else
|
else
|
||||||
echo "!! WARNING !! Unknown State (report to devs)"
|
echo "!! WARNING !! Unknown State (report to devs)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${keyRetry}" == "x" ] || [ "${keyRetry}" == "X" ] || [ "${keyRetry}" == "'x'" ]; then
|
||||||
|
# create no result file and exit
|
||||||
|
echo "# USER CANCEL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# in setup scenario the final import is happening during provison
|
# in setup scenario the final import is happening during provison
|
||||||
|
@@ -72,23 +72,30 @@ if [ "${migrationOS}" == "raspiblitz" ]; then
|
|||||||
echo "!! WARNING !!"
|
echo "!! WARNING !!"
|
||||||
echo "There was no upload found in ${defaultUploadPath}"
|
echo "There was no upload found in ${defaultUploadPath}"
|
||||||
echo "Make sure you upload only one tar.gz-file and start again."
|
echo "Make sure you upload only one tar.gz-file and start again."
|
||||||
echo "PRESS ENTER to continue & retry"
|
echo "PRESS ENTER to continue & retry ... or 'x'+ ENTER to cancel"
|
||||||
read key
|
read keyRetry
|
||||||
elif [ "${error}" == "multiple" ]; then
|
elif [ "${error}" == "multiple" ]; then
|
||||||
echo "!! WARNING !!"
|
echo "!! WARNING !!"
|
||||||
echo "There are multiple lnd-rescue files in directory ${defaultUploadPath}"
|
echo "There are multiple lnd-rescue files in directory ${defaultUploadPath}"
|
||||||
echo "Make sure you upload only one tar.gz-file and start again."
|
echo "Make sure you upload only one tar.gz-file and start again."
|
||||||
echo "PRESS ENTER to continue & retry"
|
echo "PRESS ENTER to continue & retry ... or 'x'+ ENTER to cancel"
|
||||||
read key
|
read keyRetry
|
||||||
elif [ "${error}" == "invalid" ]; then
|
elif [ "${error}" == "invalid" ]; then
|
||||||
echo "!! WARNING !!"
|
echo "!! WARNING !!"
|
||||||
echo "The file uploaded is not a valid (complete upload failed or not correct file)."
|
echo "The file uploaded is not a valid (complete upload failed or not correct file)."
|
||||||
echo "PRESS ENTER to continue & retry"
|
echo "PRESS ENTER to continue & retry ... or 'x'+ ENTER to cancel"
|
||||||
read key
|
read keyRetry
|
||||||
else
|
else
|
||||||
|
# create no result file and exit
|
||||||
echo "!! WARNING !! Unknown State (report to devs) error(${error})"
|
echo "!! WARNING !! Unknown State (report to devs) error(${error})"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${keyRetry}" == "x" ] || [ "${keyRetry}" == "X" ] || [ "${keyRetry}" == "'x'" ]; then
|
||||||
|
# create no result file and exit
|
||||||
|
echo "# USER CANCEL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# further checks and unpacking will be done when migration is processed (not part of dialog)
|
# further checks and unpacking will be done when migration is processed (not part of dialog)
|
||||||
|
Reference in New Issue
Block a user