Fix handling of autoconnect parameter

This fixes a bug in the `network_connections` module when using the
`initscripts` provider and encountering a connection with `autoconnect`
set to false. It fails to write any `ONBOOT=` line to the interface's
`ifcfg-*` file, which RHEL treats as equivalent to `ONBOOT=yes`.

This explicitly sets `ONBOOT` for all interfaces defined, instead of
relying on what RHEL considers its default value.
This commit is contained in:
Shannon Mascarenhas 2018-05-29 12:52:02 -05:00
parent fd110a4deb
commit 5b45f9bc46

View file

@ -1302,6 +1302,8 @@ class IfcfgUtil:
if connection['autoconnect']:
ifcfg['ONBOOT'] = 'yes'
else:
ifcfg['ONBOOT'] = 'no'
ifcfg['DEVICE'] = connection['interface_name']