(self)
| 559 | self.serviceName = "SElinux" |
| 560 | |
| 561 | def config(self): |
| 562 | selinuxEnabled = True |
| 563 | |
| 564 | if not bash("selinuxenabled").isSuccess(): |
| 565 | selinuxEnabled = False |
| 566 | |
| 567 | if selinuxEnabled: |
| 568 | try: |
| 569 | bash("setenforce 0") |
| 570 | cfo = configFileOps("/etc/selinux/config", self) |
| 571 | cfo.replace_line("SELINUX=", "SELINUX=permissive") |
| 572 | return True |
| 573 | except: |
| 574 | raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloudstack/agent/setup.log for detail, \ |
| 575 | or you can manually disable it before starting myCloud") |
| 576 | else: |
| 577 | return True |
| 578 | |
| 579 | def restore(self): |
| 580 | try: |
nothing calls this directly
no test coverage detected