From ae1a334a1dd1f5ca263d6036c9af1e16619482ed Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Fri, 1 Jul 2016 16:01:48 +0000 Subject: [PATCH] Remove 'if true' wrapper from 06a0d30d50ce4ea266532c06ef24880bf5363c1b --- vm-systemd/prepare-dvm.sh | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/vm-systemd/prepare-dvm.sh b/vm-systemd/prepare-dvm.sh index 92ac6f1..f5ffb85 100755 --- a/vm-systemd/prepare-dvm.sh +++ b/vm-systemd/prepare-dvm.sh @@ -9,19 +9,16 @@ possibly_run_save_script() DISPLAY=:0 su - user -c /tmp/qubes-save-script } -if true; then - echo user | /bin/sh /etc/qubes-rpc/qubes.WaitForSession - 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 )) ) - # we're still running in DispVM template - echo "Waiting for save/restore..." - qubesdb-read /qubes-restore-complete || wait $watch_pid - echo Back to life. - systemctl restart qubes-random-seed.service -fi - +echo user | /bin/sh /etc/qubes-rpc/qubes.WaitForSession +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 )) ) +# we're still running in DispVM template +echo "Waiting for save/restore..." +qubesdb-read /qubes-restore-complete || wait $watch_pid +echo Back to life. +systemctl restart qubes-random-seed.service