dmlb2000 pushed to torque (master). "add the systemd service start/stop enable/disable bits"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat May 2 15:57:03 UTC 2015


>From 20b7747ff4d46078953239f30d2c7d0f9ff9bb87 Mon Sep 17 00:00:00 2001
From: David Brown <dmlb2000 at gmail.com>
Date: Sat, 2 May 2015 08:22:39 -0700
Subject: add the systemd service start/stop enable/disable bits


diff --git a/torque.spec b/torque.spec
index f86edab..fe8a72c 100644
--- a/torque.spec
+++ b/torque.spec
@@ -115,7 +115,12 @@ BuildRequires: tcl-devel
 BuildRequires: tk-devel
 %endif
 
-
+%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
+BuildRequires: systemd
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+%endif
 
 %if 0%{?doxydoc}
 BuildRequires:  graphviz
@@ -561,31 +566,55 @@ fi
 
 
 %post mom
+%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
+%systemd_post pbs-mom.service
+%else
 /sbin/chkconfig --add pbs_mom
+%endif
 
 %preun mom
+%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
+%systemd_preun pbs-mom.service
+%else
 if [ $1 -eq 0 ]; then
    /sbin/service pbs_mom stop >/dev/null 2>&1
    /sbin/chkconfig --del pbs_mom
 fi
+%endif
 
 %post scheduler
+%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
+%systemd_post pbs-sched.service
+%else
 /sbin/chkconfig --add pbs_sched
+%endif
 
 %preun scheduler
+%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
+%systemd_preun pbs-sched.service
+%else
 if [ $1 -eq 0 ]; then
    /sbin/service pbs_sched stop >/dev/null 2>&1
    /sbin/chkconfig --del pbs_sched
 fi
+%endif
 
 %post server
+%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
+%systemd_post pbs-server.service
+%else
 /sbin/chkconfig --add pbs_server
+%endif
 
 %preun server
+%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
+%systemd_preun pbs-server.service
+%else
 if [ $1 -eq 0 ]; then
    /sbin/service pbs_server stop >/dev/null 2>&1
    /sbin/chkconfig --del pbs_server
 fi
+%endif
 
 %files
 %defattr(-, root, root, -)
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/torque.git/commit/?h=master&id=20b7747ff4d46078953239f30d2c7d0f9ff9bb87


More information about the scm-commits mailing list