Yedidyah Bar David has uploaded a new change for review.

Change subject: packaging: setup: Fix /etc/sysconfig/nfs quotes
......................................................................

packaging: setup: Fix /etc/sysconfig/nfs quotes

Put the params/values as python code and not semi-configfile, as
ConfigFile strips quotes.

Change-Id: Iaca3c6eb7195e3e3ffafa456bbd1732edad02a56
Signed-off-by: Yedidyah Bar David <d...@redhat.com>
---
M packaging/setup/plugins/ovirt-engine-setup/system/nfs.py
1 file changed, 11 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/22622/1

diff --git a/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py 
b/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py
index f33bb1a..538a9fd 100644
--- a/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py
+++ b/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py
@@ -33,9 +33,6 @@
 from otopi import filetransaction
 
 
-from ovirt_engine import configfile
-
-
 from ovirt_engine_setup import constants as osetupcons
 from ovirt_engine_setup import util as osetuputil
 from ovirt_engine_setup import dialog
@@ -46,6 +43,15 @@
     """
     NFS and RPCbind services configuration plugin.
     """
+
+    SYSCONFIG_NFS_PARAMS = {
+        'RPCNFSDCOUNT':     '8',
+        'LOCKD_TCPPORT':    '32803',
+        'LOCKD_UDPPORT':    '32769',
+        'RPCMOUNTDOPTS':    '"-p 892"',
+        'RPCRQUOTADOPTS':   '"-p 875"',
+        'STATDARG':         '"-p 662 -o 2020"',
+    }
 
     def __init__(self, context):
         super(Plugin, self).__init__(context=context)
@@ -164,9 +170,6 @@
         condition=lambda self: self._enabled,
     )
     def _misc(self):
-        config = configfile.ConfigFile([
-            osetupcons.FileLocations.OVIRT_NFS_RHEL_CONFIG
-        ])
         changed_lines = []
         content = []
         if os.path.exists(osetupcons.FileLocations.NFS_RHEL_CONFIG):
@@ -177,9 +180,9 @@
                 name=osetupcons.FileLocations.NFS_RHEL_CONFIG,
                 content=osetuputil.editConfigContent(
                     content=content,
-                    params=config.values,
+                    params=self.SYSCONFIG_NFS_PARAMS,
                     changed_lines=changed_lines,
-                    new_line_tpl='{spaces}{param}="{value}"',
+                    new_line_tpl='{spaces}{param}={value}',
                 )
             )
         )


-- 
To view, visit http://gerrit.ovirt.org/22622
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaca3c6eb7195e3e3ffafa456bbd1732edad02a56
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <d...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to