aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/impl_ifcfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'os_net_config/impl_ifcfg.py')
-rw-r--r--os_net_config/impl_ifcfg.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/os_net_config/impl_ifcfg.py b/os_net_config/impl_ifcfg.py
index 41d5f8c..bcfc4dc 100644
--- a/os_net_config/impl_ifcfg.py
+++ b/os_net_config/impl_ifcfg.py
@@ -131,7 +131,10 @@ class IfcfgNetConfig(os_net_config.NetConfig):
data = "# This file is autogenerated by os-net-config\n"
data += "DEVICE=%s\n" % base_opt.name
data += "ONBOOT=yes\n"
- data += "HOTPLUG=no\n"
+ if isinstance(base_opt, objects.Interface) and base_opt.hotplug:
+ data += "HOTPLUG=yes\n"
+ else:
+ data += "HOTPLUG=no\n"
data += "NM_CONTROLLED=no\n"
if not base_opt.dns_servers and not base_opt.use_dhcp:
data += "PEERDNS=no\n"