projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
82bad3d
)
altosui: Show dialog box if sudo fails on Mac OS X
author
Keith Packard
<keithp@keithp.com>
Sat, 27 Feb 2021 21:22:39 +0000
(13:22 -0800)
committer
Keith Packard
<keithp@keithp.com>
Sat, 27 Feb 2021 21:44:48 +0000
(13:44 -0800)
If the user types the wrong password three times, sudo will give up
and return an error.
Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/install-macosx
patch
|
blob
|
history
diff --git
a/altosui/install-macosx
b/altosui/install-macosx
index 8f0067e5a030190d3fbb25656a8338361a4b57bf..4aa741e172c2c1605b70c0fe2b552f8a798d1df3 100755
(executable)
--- a/
altosui/install-macosx
+++ b/
altosui/install-macosx
@@
-8,6
+8,13
@@
case `id -u` in
;;
*)
SUDO_ASKPASS="${dir}/ask-pass" sudo -A "$0" "$@"
;;
*)
SUDO_ASKPASS="${dir}/ask-pass" sudo -A "$0" "$@"
+ case $? in
+ 0)
+ ;;
+ *)
+ osascript -e 'display dialog "Installation failed. Incorrect password?" buttons {"OK"} default button 1 with title "Installation Status"' > /dev/null
+ ;;
+ esac
exit 0
;;
esac
exit 0
;;
esac