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