Add PRIMARY=yes to the correct configuration file.
[pyplnet.git] / plnet.py
index c012067..151cd2f 100755 (executable)
--- a/plnet.py
+++ b/plnet.py
@@ -48,6 +48,8 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa
         inter['USERCTL']='no'
         if network['mac']:
             inter['HWADDR'] = network['mac']
+        if network['is_primary']:
+            inter['PRIMARY']='yes'
 
         if network['method'] == "static":
             inter['BOOTPROTO'] = "static"
@@ -56,6 +58,7 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa
 
         elif network['method'] == "dhcp":
             inter['BOOTPROTO'] = "dhcp"
+            inter['PERSISTENT_DHCLIENT'] = "yes"
             if network['hostname']:
                 inter['DHCP_HOSTNAME'] = network['hostname']
             else: