dispvm: do not restart qubesdb-daemon, use watch instead

qubesdb-daemon will handle reconnection by itself.
This commit is contained in:
Marek Marczykowski-Górecki 2015-03-04 02:10:28 +01:00
parent 57be910135
commit 3687c4e622

View File

@ -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