Yeah, don't use that script. $UPSTART_EVENTS is the variable containing the list of events that triggered the *start* of the job; so anything that's 'start on [...] runlevel [...]' will always match and then we have the same race condition all over again.
Here's an alternative that DTRT.
post-stop script
if [ "$UPSTART_STOP_EVENTS" = runlevel ]; then initctl emit desktop-shutdown
fi
end script
Tested out here with gdm and lightdm installed; the dots-over-text error goes away with this change.
Yeah, don't use that script. $UPSTART_EVENTS is the variable containing the list of events that triggered the *start* of the job; so anything that's 'start on [...] runlevel [...]' will always match and then we have the same race condition all over again.
Here's an alternative that DTRT. STOP_EVENTS" = runlevel ]; then
initctl emit desktop-shutdown
post-stop script
if [ "$UPSTART_
fi
end script
Tested out here with gdm and lightdm installed; the dots-over-text error goes away with this change.