dom0/qvm-tools: clean resolv.conf when networking goes down

This commit is contained in:
Alexandre Bezroutchko 2012-10-18 06:30:47 +02:00 committed by Marek Marczykowski
parent 3a875edf58
commit d6432a16c4

View File

@ -75,6 +75,8 @@ def netdown():
if not vif_eth0_exists():
print >> sys.stderr, 'There is no eth0 that is a Xen vif device, aborting.'
sys.exit(1)
resolv_conf = open('/etc/resolv.conf', "w")
resolv_conf.close()
os.system('ifconfig eth0 down')
os.system('xl network-detach 0 0')