diff options
author | Erich Eckner <git@eckner.net> | 2020-02-12 09:54:54 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-02-12 09:54:54 +0100 |
commit | 2eee9bdb6a2ab51a8be62da87f9932c789ccfe6d (patch) | |
tree | af8fa1369a1626f57a668007ca8981e0527f2aea | |
parent | b1fd652f1a71ef6cb322bf7a97ee05504943eb7b (diff) | |
download | update-all-2eee9bdb6a2ab51a8be62da87f9932c789ccfe6d.tar.xz |
update-me: exit_or_rescue_shell() kann mehr
-rw-r--r-- | update-me.in | 15 |
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 |