Hello Ofer Schreiber,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/12781
to review the following change.
Change subject: packaging: engine-setup - make firewall checking more robust
......................................................................
packaging: engine-setup - make firewall checking more robust
1. Don't execute systemctl if it's not available in the system.
2. append ".service" to services name for backward compatibility.
Backported from master commit 3a34cda66edd76d49af7905fcfeb218acbf35a50.
Change-Id: I9ce0424730ee1c2076d274a060f25509c6d4fcbb
Signed-off-by: Ofer Schreiber <[email protected]>
---
M packaging/fedora/setup/common_utils.py
1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/81/12781/1
diff --git a/packaging/fedora/setup/common_utils.py
b/packaging/fedora/setup/common_utils.py
index 05eb0c2..b6575d3 100755
--- a/packaging/fedora/setup/common_utils.py
+++ b/packaging/fedora/setup/common_utils.py
@@ -1285,10 +1285,13 @@
cmd = [
basedefs.EXEC_SYSTEMCTL,
"show",
- self.name
+ "%s.service" % self.name
]
- out, rc = execCmd(cmdList=cmd)
- sysd = "LoadState=loaded" in out
+ if os.path.exists(basedefs.EXEC_SYSTEMCTL):
+ out, rc = execCmd(cmdList=cmd)
+ sysd = "LoadState=loaded" in out
+ else:
+ sysd = False
# Checks if systemV service available
sysv = os.path.exists("/etc/init.d/%s" % self.name)
--
To view, visit http://gerrit.ovirt.org/12781
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ce0424730ee1c2076d274a060f25509c6d4fcbb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches