diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-03-17 17:00:46 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-03-17 17:00:46 -0400 |
commit | 56402e91e95960f54a39eb18cbda391f00f95b6e (patch) | |
tree | 4719aaa98096cb1b062b29768888eb1fa3785fc8 /cloudinit/sources/helpers/vmware/imc/config_nic.py | |
parent | a27abb80969fd35dc150bcb2d9bddb7dbf98babe (diff) | |
parent | 13a32d7599a939370ee0bc0e7257da2c59b4bd61 (diff) | |
download | vyos-cloud-init-56402e91e95960f54a39eb18cbda391f00f95b6e.tar.gz vyos-cloud-init-56402e91e95960f54a39eb18cbda391f00f95b6e.zip |
Send proper SUCCESS / FAILED events to the underlying VMware hypervisor.
Added code to customize timezone.
Added few utility functions to send events to the VMware hypervisor.
Re-factored the code little bit.
Added code to send SUCCESS event when customization succeeds.
Added code to send FAILED event if any error occurs during customization.
Diffstat (limited to 'cloudinit/sources/helpers/vmware/imc/config_nic.py')
-rw-r--r-- | cloudinit/sources/helpers/vmware/imc/config_nic.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/sources/helpers/vmware/imc/config_nic.py b/cloudinit/sources/helpers/vmware/imc/config_nic.py index 8c5c08cf..77098a05 100644 --- a/cloudinit/sources/helpers/vmware/imc/config_nic.py +++ b/cloudinit/sources/helpers/vmware/imc/config_nic.py @@ -205,7 +205,8 @@ class NicConfigurator: def clear_dhcp(self): logger.info('Clearing DHCP leases') - util.subp(["pkill", "dhclient"]) + # Ignore the return code 1. + util.subp(["pkill", "dhclient"], rcs=[0, 1]) util.subp(["rm", "-f", "/var/lib/dhcp/*"]) def if_down_up(self): |