dom0: call qrexec service while preparing NetVM for sleep (#617)
Instead of hardcoded commands.
This commit is contained in:
		
							parent
							
								
									906332ea40
								
							
						
					
					
						commit
						2c1201b4a9
					
				@ -16,7 +16,7 @@ get_running_netvms() {
 | 
			
		||||
suspend_net()
 | 
			
		||||
{
 | 
			
		||||
    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
 | 
			
		||||
    # Ignore exit status from netvm...
 | 
			
		||||
    return 0
 | 
			
		||||
@ -25,7 +25,7 @@ suspend_net()
 | 
			
		||||
resume_net()
 | 
			
		||||
{
 | 
			
		||||
    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
 | 
			
		||||
    # Ignore exit status from netvm...
 | 
			
		||||
    return 0
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user