summaryrefslogtreecommitdiff
path: root/update-me.in
diff options
context:
space:
mode:
Diffstat (limited to 'update-me.in')
-rw-r--r--update-me.in41
1 files changed, 32 insertions, 9 deletions
diff --git a/update-me.in b/update-me.in
index 5b80572..7112311 100644
--- a/update-me.in
+++ b/update-me.in
@@ -105,6 +105,19 @@ exit_or_rescue_shell() {
exit "$1"
}
+nochmal_versuchen() {
+ >&2 printf '%s (%s): Fehler - nochmal versuchen?\n' "$(hostname)" "${cmd}"
+ while read -t 0.0001; do
+ :
+ done
+ read s
+ if [ -n "${s}" ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
. #ETCDIR#/update-me.conf
if ! command -v sudo >/dev/null; then
@@ -155,6 +168,15 @@ do
eval ${cmd}
fi
err=$?
+ while [ ${err} -ne 0 ] && nochmal_versuchen; do
+ if [ -z "${cmd%%check-kernel*}" ] \
+ || [ -z "${cmd%%mount*}" ]; then
+ eval ${pre} ${cmd}
+ else
+ eval ${cmd}
+ fi
+ err=$?
+ done
if [ ${err} -ne 0 ]
then
exit_or_rescue_shell ${err}
@@ -165,15 +187,7 @@ for cmd in "${cmds[@]}"
do
eval ${pre} ${cmd}
err=$?
- while [ ${err} -ne 0 ]; do
- >&2 printf '%s (%s): Fehler - nochmal versuchen?\n' "$(hostname)" "${cmd}"
- while read -t 0.0001; do
- :
- done
- read s
- if [ -n "${s}" ]; then
- break
- fi
+ while [ ${err} -ne 0 ] && nochmal_versuchen; do
eval ${pre} ${cmd}
err=$?
done
@@ -193,6 +207,15 @@ do
eval ${cmd}
fi
err=$?
+ while [ ${err} -ne 0 ] && nochmal_versuchen; do
+ if [ -z "${cmd%%check-kernel*}" ] \
+ || [ -z "${cmd%%mount*}" ]; then
+ eval ${pre} ${cmd}
+ else
+ eval ${cmd}
+ fi
+ err=$?
+ done
if [ ${err} -ne 0 ]
then
exit_or_rescue_shell ${err}