summaryrefslogtreecommitdiff
path: root/update-me.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-12-02 20:50:31 +0100
committerErich Eckner <git@eckner.net>2017-02-18 09:10:14 +0100
commit6b61e292186b28f1b227f078453059deaa569a05 (patch)
tree37650fb67b42ff1ca698c7898629b05427784f51 /update-me.in
parent24f3ac480c86c0d975ea3356b235926bb29b0e72 (diff)
downloadupdate-all-6b61e292186b28f1b227f078453059deaa569a05.tar.xz
update-me gibt nun erneute Chance bei falschem Passwort für su
Diffstat (limited to 'update-me.in')
-rw-r--r--update-me.in11
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