~smoser/cloud-init/azure_dhcp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
#
# Current versions of RHEL and CentOS do not honor
# the directory /etc/dhcp/dhclient-exit-hooks.d so
# this file can be placed in /etc/dhcp/dhclient.d
# instead

hook-rhel_config(){
    cloud-init dhclient_hook up $interface
}

hook-rhel_restore(){
    cloud-init dhclient_hook down $interface
}