Browse Source

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).
Marek Marczykowski-Górecki 7 years ago
parent
commit
22002a34f3
2 changed files with 4 additions and 1 deletions
  1. 1 1
      Makefile
  2. 3 0
      qubes-rpc/qubes.WaitForSession

+ 1 - 1
Makefile

@@ -259,7 +259,7 @@ install-common:
 	install -m 0644 qubes-rpc/{qubes.SuspendPre,qubes.SuspendPost,qubes.GetAppmenus} $(DESTDIR)/etc/qubes-rpc
 	install -m 0755 qubes-rpc/qubes.SuspendPreAll $(DESTDIR)/etc/qubes-rpc
 	install -m 0755 qubes-rpc/qubes.SuspendPostAll $(DESTDIR)/etc/qubes-rpc
-	install -m 0644 qubes-rpc/qubes.WaitForSession $(DESTDIR)/etc/qubes-rpc
+	install -m 0755 qubes-rpc/qubes.WaitForSession $(DESTDIR)/etc/qubes-rpc
 	install -m 0644 qubes-rpc/qubes.DetachPciDevice $(DESTDIR)/etc/qubes-rpc
 	install -m 0644 qubes-rpc/qubes.{Backup,Restore} $(DESTDIR)/etc/qubes-rpc
 	install -m 0644 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc

+ 3 - 0
qubes-rpc/qubes.WaitForSession

@@ -1,2 +1,5 @@
+#!/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