suspend: let errors be logged into journald

The \0 after error code prevent logging error message which is after it.
This change clobber qubesd-query exit code with tr exit code (mostly 0),
but this is a good thing - failing qubes-suspend service does not
prevent the suspend, but do prevent the stop hooks being called, which
for example breaks time synchronization or may leave some domains
paused.

QubesOS/qubes-issues#3489
This commit is contained in:
Marek Marczykowski-Górecki 2019-02-24 14:07:41 +01:00
parent 59ecf8eb83
commit e5deabe0aa
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -3,10 +3,10 @@
case "$1" in case "$1" in
suspend|hibernate) suspend|hibernate)
qubesd-query -e --fail -c /var/run/qubesd.internal.sock \ qubesd-query -e --fail -c /var/run/qubesd.internal.sock \
dom0 internal.SuspendPre dom0 dom0 internal.SuspendPre dom0 | tr '\0' ' '
;; ;;
resume|thaw) resume|thaw)
qubesd-query -e --fail -c /var/run/qubesd.internal.sock \ qubesd-query -e --fail -c /var/run/qubesd.internal.sock \
dom0 internal.SuspendPost dom0 dom0 internal.SuspendPost dom0 | tr '\0' ' '
;; ;;
esac esac