From: Thierry Parmentelat Date: Tue, 8 Feb 2011 14:26:20 +0000 (+0100) Subject: protect shell variables in ifcfg files, for lines like X-Git-Tag: pyplnet-4.3-9~1^2~1 X-Git-Url: http://git.onelab.eu/?p=pyplnet.git;a=commitdiff_plain;h=a8c7e65c89e1e44f0cceb9bbc7b20e5cd054c1a7 protect shell variables in ifcfg files, for lines like DHCLIENTARGS"-R subnet-mask" --- diff --git a/plnet.py b/plnet.py index c4cd5fc..f12c173 100755 --- 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: