File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,6 +321,33 @@ def restore(self):
321321 logging .debug (formatExceptionInfo ())
322322 return False
323323
324+ class nfsConfig (serviceCfgBase ):
325+ def __init__ (self , syscfg ):
326+ super (nfsConfig , self ).__init__ (syscfg )
327+ self .serviceName = "Nfs"
328+
329+ def config (self ):
330+ try :
331+ if not os .path .exists ("/etc/nfsmount.conf" ):
332+ return True
333+
334+ cfo = configFileOps ("/etc/nfsmount.conf" )
335+ cfo .addEntry ("AC" , "False" )
336+ cfo .save ()
337+
338+ self .syscfg .svo .enableService ("rpcbind" )
339+ self .syscfg .svo .stopService ("rpcbind" )
340+ self .syscfg .svo .startService ("rpcbind" )
341+
342+ self .syscfg .svo .enableService ("nfs" )
343+ self .syscfg .svo .stopService ("nfs" )
344+ self .syscfg .svo .startService ("nfs" )
345+
346+ return True
347+ except :
348+ logging .debug (formatExceptionInfo ())
349+ return False
350+
324351class securityPolicyConfigUbuntu (serviceCfgBase ):
325352 def __init__ (self , syscfg ):
326353 super (securityPolicyConfigUbuntu , self ).__init__ (syscfg )
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ def __init__(self, glbEnv):
133133 networkConfigUbuntu (self ),
134134 libvirtConfigUbuntu (self ),
135135 firewallConfigUbuntu (self ),
136+ nfsConfig (self ),
136137 cloudAgentConfig (self )]
137138
138139#it covers RHEL6/Fedora13/Fedora14
@@ -144,6 +145,7 @@ def __init__(self, glbEnv):
144145 networkConfigRedhat (self ),
145146 libvirtConfigRedhat (self ),
146147 firewallConfigAgent (self ),
148+ nfsConfig (self ),
147149 cloudAgentConfig (self )]
148150
149151#It covers RHEL5/CentOS5, the mainly difference is that there is no cgroup
You can’t perform that action at this time.
0 commit comments