Handle case where .UNFONFIGURE file isn't there

pull/4420/head
Paul Markham 2015-06-29 12:43:14 +10:00 committed by Matt Clay
parent 3610cf244e
commit 9073db0ee9
1 changed files with 2 additions and 1 deletions

View File

@ -161,7 +161,8 @@ class Zone(object):
self.configure_ssh_keys()
def configure_sysid(self):
os.unlink('%s/root/etc/.UNCONFIGURED' % self.path)
if os.path.isfile('%s/root/etc/.UNCONFIGURED' % self.path):
os.unlink('%s/root/etc/.UNCONFIGURED' % self.path)
open('%s/root/noautoshutdown' % self.path, 'w').close()