From 040e4f4b05f217910c9de62b158d7e5f37822824 Mon Sep 17 00:00:00 2001 From: Bruno Binet Date: Tue, 3 Feb 2015 11:38:36 +0100 Subject: [PATCH] Fix support for allow-hotplug in debian_ip network module This patch restores support for allow-hotplug directive which have been dropped by commit b2fa638d6dc4e7b629b478a0dd2685acdc50d260 When setting "hotplug: True" in network.managed state, this was not taken into account and the allow-hotplug setting would be removed from /etc/network/interfaces. --- salt/modules/debian_ip.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/salt/modules/debian_ip.py b/salt/modules/debian_ip.py index 8033260639..8a9381888d 100644 --- a/salt/modules/debian_ip.py +++ b/salt/modules/debian_ip.py @@ -1165,6 +1165,9 @@ def _parse_settings_eth(opts, iface_type, enabled, iface): if enabled: adapters[iface]['enabled'] = True + if opts.get('hotplug', False): + adapters[iface]['hotplug'] = True + iface_data['inet']['addrfam'] = 'inet' if iface_type not in ['bridge']: