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 possibly_run_save_script
umount /rw umount /rw
dmesg -c >/dev/null dmesg -c >/dev/null
qubesdb-watch /qubes-restore-complete &
watch_pid=$!
free | grep Mem: | free | grep Mem: |
(read label total used free shared buffers cached; qubesdb-write /qubes-used-mem $[ $used + $cached ]) (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 # we're still running in DispVM template
echo "Waiting for save/restore..." echo "Waiting for save/restore..."
# the service will start only after successful restore qubesdb-read /qubes-restore-complete || wait $watch_pid
systemctl start qubes-db.service
echo Back to life. echo Back to life.
fi fi