From a8c7e65c89e1e44f0cceb9bbc7b20e5cd054c1a7 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 8 Feb 2011 15:26:20 +0100 Subject: [PATCH] protect shell variables in ifcfg files, for lines like DHCLIENTARGS"-R subnet-mask" --- plnet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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: -- 2.43.0