summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--update-me.in16
1 files changed, 12 insertions, 4 deletions
diff --git a/update-me.in b/update-me.in
index 1df456d..cb5ce13 100644
--- a/update-me.in
+++ b/update-me.in
@@ -20,6 +20,14 @@ if command -v check-kernel >/dev/null; then
postCmds+=('check-kernel -r')
fi
+exit_or_rescue_shell() {
+ read s
+ if [ -n "${s}" ]; then
+ bash
+ fi
+ exit $1
+}
+
. #ETCDIR#/update-me.conf
if ! command -v sudo >/dev/null; then
@@ -74,7 +82,7 @@ do
then
>&2 printf '%s: Fehler\n' "$(hostname)"
read s
- exit ${err}
+ exit_or_rescue_shell ${err}
fi
done
@@ -86,7 +94,7 @@ do
then
>&2 printf '%s: Fehler\n' "$(hostname)"
read s
- exit ${err}
+ exit_or_rescue_shell ${err}
fi
done
@@ -103,10 +111,10 @@ do
then
>&2 printf '%s: Fehler\n' "$(hostname)"
read s
- exit ${err}
+ exit_or_rescue_shell ${err}
fi
done
>&2 printf '%s: Erfolg\n' "$(hostname)"
read s
-exit 0
+exit_or_rescue_shell 0