Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: spec: enable vdsm-reg to autostart
......................................................................

spec: enable vdsm-reg to autostart

This patch enables vdsm-reg to autostart for systemd schema or sysv.

Change-Id: I5aad8014ad37838ceb1ab467380fbe9ffc62ae0b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1152916
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
---
M ovirt-node-plugin-vdsm.spec.in
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node-plugin-vdsm 
refs/changes/56/35356/1

diff --git a/ovirt-node-plugin-vdsm.spec.in b/ovirt-node-plugin-vdsm.spec.in
index f2eb540..49f6fb1 100644
--- a/ovirt-node-plugin-vdsm.spec.in
+++ b/ovirt-node-plugin-vdsm.spec.in
@@ -1,5 +1,9 @@
 %define is_f19 %(test "0%{?fedora}" -eq "019" && echo 1 || echo 0)
 
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
+%global with_systemd 1
+%endif
+
 Summary:        A plugin to make oVirt Node installs compatible with oVirt 
Engine and vdsm
 Name:           ovirt-node-plugin-vdsm
 Version:        @PACKAGE_RPM_VERSION@
@@ -50,6 +54,15 @@
 make install DESTDIR=%{buildroot}
 
 %post
+if [ "$1" -eq 1 ] ; then
+%if 0%{?with_systemd}
+    /bin/systemctl enable vdsm-reg.service >/dev/null 2>&1 || :
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+%else
+    /sbin/chkconfig --add vdsm-reg
+%endif
+fi
+
 # reserve vdsm port 54321
 augtool << \EOF_sysctl
 set /files/etc/sysctl.conf/net.ipv4.ip_local_reserved_ports 54321


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5aad8014ad37838ceb1ab467380fbe9ffc62ae0b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-plugin-vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to