diff options
author | Brent Baude <bbaude@redhat.com> | 2016-08-10 16:36:49 -0600 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-08-15 10:16:19 -0400 |
commit | 648dbbf6b090c81e989f1ab70bf99f4de16a6a70 (patch) | |
tree | c69218dffe430477054483edd7876cc56b902370 /setup.py | |
parent | bc2c3267549b9067c017a34e22bbee18890aec06 (diff) | |
download | vyos-cloud-init-648dbbf6b090c81e989f1ab70bf99f4de16a6a70.tar.gz vyos-cloud-init-648dbbf6b090c81e989f1ab70bf99f4de16a6a70.zip |
Get Azure endpoint server from DHCP client
It is more efficient and cross-distribution safe to use the hooks function
from dhclient to obtain the Azure endpoint server (DHCP option 245).
This is done by providing shell scritps that are called by the hooks
infrastructure of both dhclient and NetworkManager. The hooks then
invoke 'cloud-init dhclient-hook' that maintains json data
with the dhclient options in
/run/cloud-init/dhclient.hooks/<interface>.json .
The azure helper then pulls the value from
/run/cloud-init/dhclient.hooks/<interface>.json file(s). If that file does
not exist or the value is not present, it will then fall back to the
original method of scraping the dhcp client lease file.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -176,6 +176,8 @@ else: (ETC + '/cloud', glob('config/*.cfg')), (ETC + '/cloud/cloud.cfg.d', glob('config/cloud.cfg.d/*')), (ETC + '/cloud/templates', glob('templates/*')), + (ETC + '/NetworkManager/dispatcher.d/', ['tools/hook-network-manager']), + (ETC + '/dhcp/dhclient-exit-hooks.d/', ['tools/hook-dhclient']), (USR_LIB_EXEC + '/cloud-init', ['tools/uncloud-init', 'tools/write-ssh-key-fingerprints']), (USR + '/share/doc/cloud-init', [f for f in glob('doc/*') if is_f(f)]), |