Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
mxtools/checktrust/lightdm-show-trust-warning
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
28 lines (23 sloc)
742 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/bash | |
while true; do | |
reply="$(/usr/sbin/checktrust)" | |
if [ "$reply" = "trusted" ]; then | |
break | |
elif [ "$reply" = "not trusted" ]; then | |
if [ -z "$XDOPID" ]; then | |
(while true; do xdotool search --sync --name bla windowraise; sleep 1; done) & | |
XDOPID=$! | |
fi | |
xdotool search --sync --name bla windowraise & | |
zenity --width 400 --error --title bla --text \ | |
"<b>Loss of trust detected!</b> | |
Looks like your machine lost the trust of our network. Maybe it was offline for too long. | |
<i>You won't be able to log in.</i> | |
<b>Please contact IT Helpdesk</b> | |
helpdesk@molgen.mpg.de | |
phone: -1708" | |
continue | |
fi | |
sleep 5 | |
done | |
test -n "$XDOPID" && kill $XDOPID |