dispvm: restart qubesdb at DispVM start
To connect to new qubesdb daemon in dom0.
This commit is contained in:
parent
1f04cf34cc
commit
d00d52fc31
@ -52,13 +52,16 @@ start()
|
|||||||
dmesg -c >/dev/null
|
dmesg -c >/dev/null
|
||||||
free | grep Mem: |
|
free | grep Mem: |
|
||||||
(read a b c d ; qubesdb-write /qubes-used-mem $c)
|
(read a b c d ; qubesdb-write /qubes-used-mem $c)
|
||||||
|
# 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..."
|
||||||
# ... wait until qubes-restore.c (in Dom0) recreates VM-specific keys
|
# the service will start only after successful restore
|
||||||
# TODO: restart qubesdb service before this
|
systemctl start qubes-db.service
|
||||||
while ! qubesdb-read /qubes-restore-complete 2>/dev/null ; do
|
|
||||||
usleep 10
|
|
||||||
done
|
|
||||||
echo Back to life.
|
echo Back to life.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -25,13 +25,16 @@ if qubesdb-read /qubes-save-request 2>/dev/null ; then
|
|||||||
dmesg -c >/dev/null
|
dmesg -c >/dev/null
|
||||||
free | grep Mem: |
|
free | grep Mem: |
|
||||||
(read a b c d ; qubesdb-write /qubes-used-mem $c)
|
(read a b c d ; qubesdb-write /qubes-used-mem $c)
|
||||||
|
# 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..."
|
||||||
# ... wait until qubes-restore.c (in Dom0) recreates VM-specific keys
|
# the service will start only after successful restore
|
||||||
# TODO: restart qubesdb-daemon before this
|
systemctl start qubes-db.service
|
||||||
while ! qubesdb-read /qubes-restore-complete 2>/dev/null ; do
|
|
||||||
usleep 10
|
|
||||||
done
|
|
||||||
echo Back to life.
|
echo Back to life.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user