summaryrefslogtreecommitdiff
path: root/update-me.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-02-12 09:54:54 +0100
committerErich Eckner <git@eckner.net>2020-02-12 09:54:54 +0100
commit2eee9bdb6a2ab51a8be62da87f9932c789ccfe6d (patch)
treeaf8fa1369a1626f57a668007ca8981e0527f2aea /update-me.in
parentb1fd652f1a71ef6cb322bf7a97ee05504943eb7b (diff)
downloadupdate-all-2eee9bdb6a2ab51a8be62da87f9932c789ccfe6d.tar.xz
update-me: exit_or_rescue_shell() kann mehr
Diffstat (limited to 'update-me.in')
-rw-r--r--update-me.in15
1 files changed, 6 insertions, 9 deletions
diff --git a/update-me.in b/update-me.in
index cb5ce13..46db7f7 100644
--- a/update-me.in
+++ b/update-me.in
@@ -21,11 +21,16 @@ if command -v check-kernel >/dev/null; then
fi
exit_or_rescue_shell() {
+ if [ "$1" -eq 0 ]; then
+ >&2 printf '%s: Erfolg\n' "$(hostname)"
+ else
+ >&2 printf '%s: Fehler\n' "$(hostname)"
+ fi
read s
if [ -n "${s}" ]; then
bash
fi
- exit $1
+ exit "$1"
}
. #ETCDIR#/update-me.conf
@@ -80,8 +85,6 @@ do
err=$?
if [ ${err} -ne 0 ]
then
- >&2 printf '%s: Fehler\n' "$(hostname)"
- read s
exit_or_rescue_shell ${err}
fi
done
@@ -92,8 +95,6 @@ do
err=$?
if [ ${err} -ne 0 ]
then
- >&2 printf '%s: Fehler\n' "$(hostname)"
- read s
exit_or_rescue_shell ${err}
fi
done
@@ -109,12 +110,8 @@ do
err=$?
if [ ${err} -ne 0 ]
then
- >&2 printf '%s: Fehler\n' "$(hostname)"
- read s
exit_or_rescue_shell ${err}
fi
done
->&2 printf '%s: Erfolg\n' "$(hostname)"
-read s
exit_or_rescue_shell 0