diff options
author | Erich Eckner <git@eckner.net> | 2016-12-02 20:50:31 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-02-18 09:10:14 +0100 |
commit | 6b61e292186b28f1b227f078453059deaa569a05 (patch) | |
tree | 37650fb67b42ff1ca698c7898629b05427784f51 | |
parent | 24f3ac480c86c0d975ea3356b235926bb29b0e72 (diff) | |
download | update-all-6b61e292186b28f1b227f078453059deaa569a05.tar.xz |
update-me gibt nun erneute Chance bei falschem Passwort für su
-rw-r--r-- | update-me.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/update-me.in b/update-me.in index 398e485..b115ed9 100644 --- a/update-me.in +++ b/update-me.in @@ -11,8 +11,15 @@ then if ! "${hasSudo}" then hostname - su -c "$(readlink -f "$0")" - exit $? + err=1 + maxCount=3 + while [ ${err} -eq 1 ] && [ ${maxCount} -gt 0 ] + do + su -c "$(readlink -f "$0") || exit 2" + err=$? + maxCount=$[${maxCount} - 1] + done + exit ${err} fi pre='sudo' else |