Browse Source

Avoid race condition

Giulio 3 months ago
parent
commit
9b13d85be5
1 changed files with 8 additions and 4 deletions
  1. 8 4
      update.sh

+ 8 - 4
update.sh

@@ -1,8 +1,12 @@
 #!/usr/bin/env bash
 
 qvm-run --pass-io sys-net 'bash /home/user/pull.sh'
-qvm-run --pass-io sys-net 'cat /tmp/core-admin/qubes/firewall.py' > /usr/lib/python3.5/site-packages/qubes/firewall.py
-qvm-run --pass-io sys-net 'cat /tmp/core-admin/qubes/vm/mix/net.py' > /usr/lib/python3.5/site-packages/qubes/vm/mix/net.py
-qvm-run --pass-io sys-net 'cat /tmp/core-admin-client/qubesadmin/firewall.py' > /usr/lib/python3.5/site-packages/qubesadmin/firewall.py 
-qvm-run --pass-io sys-net 'cat /tmp/core-admin-client/qubesadmin/tools/qvm_firewall.py' > /usr/lib/python3.5/site-packages/qubesadmin/tools/qvm_firewall.py
+qvm-run --pass-io sys-net 'cat /tmp/core-admin/qubes/firewall.py' > /tmp/1
+qvm-run --pass-io sys-net 'cat /tmp/core-admin/qubes/vm/mix/net.py' > /tmp/2
+qvm-run --pass-io sys-net 'cat /tmp/core-admin-client/qubesadmin/firewall.py' > /tmp/3
+qvm-run --pass-io sys-net 'cat /tmp/core-admin-client/qubesadmin/tools/qvm_firewall.py' > /tmp/4
+mv /tmp/1 /usr/lib/python3.5/site-packages/qubes/firewall.py
+mv /tmp/2 /usr/lib/python3.5/site-packages/qubes/vm/mix/net.py
+mv /tmp/3 /usr/lib/python3.5/site-packages/qubesadmin/firewall.py
+mv /tmp/4 /usr/lib/python3.5/site-packages/qubesadmin/tools/qvm_firewall.py
 systemctl restart qubesd