From 3687c4e622bb34cf923005e28fd7d4926acaaad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 4 Mar 2015 02:10:28 +0100 Subject: [PATCH] dispvm: do not restart qubesdb-daemon, use watch instead qubesdb-daemon will handle reconnection by itself. --- vm-systemd/prepare-dvm.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/vm-systemd/prepare-dvm.sh b/vm-systemd/prepare-dvm.sh index 4fc23d7..04a9e1f 100755 --- a/vm-systemd/prepare-dvm.sh +++ b/vm-systemd/prepare-dvm.sh @@ -14,18 +14,13 @@ if true; then possibly_run_save_script umount /rw dmesg -c >/dev/null + qubesdb-watch /qubes-restore-complete & + watch_pid=$! free | grep Mem: | (read label total used free shared buffers cached; qubesdb-write /qubes-used-mem $[ $used + $cached ]) - # give dom0 time to read some entries, when done it will shutdown qubesdb, - # so wait for it - qubesdb-watch /stop-qubesdb - # just to make sure - systemctl stop qubes-db.service - # we're still running in DispVM template echo "Waiting for save/restore..." - # the service will start only after successful restore - systemctl start qubes-db.service + qubesdb-read /qubes-restore-complete || wait $watch_pid echo Back to life. fi