Update firewall rules on VM start

This commit is contained in:
Tomasz Sterna 2011-03-09 17:38:34 +01:00
parent f05c244321
commit ca81f0103d

View File

@ -552,11 +552,16 @@ class QubesVm(object):
self.force_shutdown() self.force_shutdown()
raise OSError ("ERROR: Cannot attach to network backend!") raise OSError ("ERROR: Cannot attach to network backend!")
#if verbose: qvm_collection = QubesVmCollection()
# print "--> Updating FirewallVMs rules..." qvm_collection.lock_db_for_reading()
#for vm in qvm_collection.values(): qvm_collection.load()
# if vm.is_fwvm(): qvm_collection.unlock_db()
# vm.write_iptables_xenstore_entry()
if verbose:
print "--> Updating FirewallVMs rules..."
for vm in qvm_collection.values():
if vm.is_fwvm():
vm.write_iptables_xenstore_entry()
if verbose: if verbose:
print "--> Starting the VM..." print "--> Starting the VM..."