I have two problems with it. First, this generates a configuration file named “ifcfg-” instead of “ifcfg-eth1” and second, it copies the resource name into the IP address - which obviously makes no sense for a DHCP interface. Unfortunately, the examples in the documentation are less than helpful, because they all use the IP address as the resource name.
In fact, the documentation actually is self-contradictory when it comes to DHCP. There is an example “Specify a boot protocol” that claims that this is what I’d need - and later the identical code in another example claims to generate a different configuration in the sample “Update a static IP address with a boot protocol”
I have two problems with it. First, this generates a configuration file
named "ifcfg-" instead of "ifcfg-eth1" and second, it copies the resource
name into the IP address - which obviously makes no sense for a DHCP
interface. Unfortunately, the examples in the documentation are less than
helpful, because they all use the IP address as the resource name.
In fact, the documentation actually is self-contradictory when it comes to
DHCP. There is an example "Specify a boot protocol" that claims that this
is what I'd need - and later the identical code in another example claims
to generate a different configuration in the sample "Update a static IP
address with a boot protocol"