mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-19 09:24:41 +00:00
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:
parent
fd110a4deb
commit
5b45f9bc46
1 changed files with 2 additions and 0 deletions
|
|
@ -1302,6 +1302,8 @@ class IfcfgUtil:
|
|||
|
||||
if connection['autoconnect']:
|
||||
ifcfg['ONBOOT'] = 'yes'
|
||||
else:
|
||||
ifcfg['ONBOOT'] = 'no'
|
||||
|
||||
ifcfg['DEVICE'] = connection['interface_name']
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue