| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 08bb9ea commit 262ad16
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -321,6 +321,33 @@ def restore(self): | |||
| 321 | 321 | logging.debug(formatExceptionInfo()) | |
| 322 | 322 | return False | |
| 323 | 323 | ||
| 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 | + | ||
| 324 | 351 | class securityPolicyConfigUbuntu(serviceCfgBase): | |
| 325 | 352 | def __init__(self, syscfg): | |
| 326 | 353 | super(securityPolicyConfigUbuntu, self).__init__(syscfg) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -133,6 +133,7 @@ def __init__(self, glbEnv): | |||
| 133 | 133 | networkConfigUbuntu(self), | |
| 134 | 134 | libvirtConfigUbuntu(self), | |
| 135 | 135 | firewallConfigUbuntu(self), | |
| 136 | + nfsConfig(self), | ||
| 136 | 137 | cloudAgentConfig(self)] | |
| 137 | 138 | ||
| 138 | 139 | #it covers RHEL6/Fedora13/Fedora14 | |
@@ -144,6 +145,7 @@ def __init__(self, glbEnv): | |||
| 144 | 145 | networkConfigRedhat(self), | |
| 145 | 146 | libvirtConfigRedhat(self), | |
| 146 | 147 | firewallConfigAgent(self), | |
| 148 | + nfsConfig(self), | ||
| 147 | 149 | cloudAgentConfig(self)] | |
| 148 | 150 | ||
| 149 | 151 | #It covers RHEL5/CentOS5, the mainly difference is that there is no cgroup | |
| Back | FazBrowse Home | New Git URL |
0 commit comments