core-agent-linux/qubes-rpc/qubes.WaitForSession
Marek Marczykowski-Górecki 22002a34f3
Do not report spurious failure of qubes.WaitForSession service
It is expected to be killed by a signal. Exit with returncode 0 anyway.
While at it, adjust it for current service format (executable, with
proper shebang).
2017-06-08 22:11:36 +02:00

6 lines
245 B
Bash
Executable File

#!/bin/sh
read USERNAME
su -c 'echo $$ >> /tmp/qubes-session-waiter; [ ! -f /tmp/qubes-session-env ] && exec sleep inf' - "$USERNAME" 2> /dev/null
# the above line is _expected_ to be terminated by a signal, don't treat this as a failure
exit 0