dom0: call qrexec service while preparing NetVM for sleep (#617)
Instead of hardcoded commands.
This commit is contained in:
parent
6d6f43fb4e
commit
32fbd5aefd
@ -16,7 +16,7 @@ get_running_netvms() {
|
|||||||
suspend_net()
|
suspend_net()
|
||||||
{
|
{
|
||||||
for VM in `get_running_netvms`; do
|
for VM in `get_running_netvms`; do
|
||||||
qvm-run -u root --pass-io $VM 'service NetworkManager stop; for if in `ls /sys/class/net|grep -v "lo\|vif"`; do ip l s $if down; done; modprobe -r uhci_hcd ehci_hcd'
|
qvm-run -u root --pass-io $VM 'QUBESRPC qubes.SuspendPre dom0'
|
||||||
done
|
done
|
||||||
# Ignore exit status from netvm...
|
# Ignore exit status from netvm...
|
||||||
return 0
|
return 0
|
||||||
@ -25,7 +25,7 @@ suspend_net()
|
|||||||
resume_net()
|
resume_net()
|
||||||
{
|
{
|
||||||
for VM in `get_running_netvms`; do
|
for VM in `get_running_netvms`; do
|
||||||
qvm-run -u root --pass-io $VM "modprobe ehci_hcd; modprobe uhci_hcd; [ -x /bin/systemctl ] && systemctl start NetworkManager.service || service qubes_core_netvm start"
|
qvm-run -u root --pass-io $VM 'QUBESRPC qubes.SuspendPost dom0'
|
||||||
done
|
done
|
||||||
# Ignore exit status from netvm...
|
# Ignore exit status from netvm...
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user