protect shell variables in ifcfg files, for lines like
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 8 Feb 2011 14:26:20 +0000 (15:26 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 8 Feb 2011 14:26:20 +0000 (15:26 +0100)
DHCLIENTARGS"-R subnet-mask"

plnet.py

index c4cd5fc..f12c173 100755 (executable)
--- a/plnet.py
+++ b/plnet.py
@@ -1,5 +1,4 @@
 #!/usr/bin/python /usr/bin/plcsh
-# $Id$
 
 import os
 import socket
@@ -267,7 +266,7 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa
         # print the configuration values
         for (key, val) in details.iteritems():
             if key not in ('IFNAME','ALIAS','CFGOPTIONS','DRIVER','GATEWAY'):
-                f.write('%s=%s\n' % (key, val))
+                f.write('%s="%s"\n' % (key, val))
 
         # print the configuration specific option values (if any)
         if 'CFGOPTIONS' in details: