[prev in list] [next in list] [prev in thread] [next in thread]
List: fedora-extras-commits
Subject: [openstack-keystone/el6] Add back the SysV init scripts
From: Alan Pevec <apevec () fedoraproject ! org>
Date: 2011-11-30 22:49:20
Message-ID: 20111130224920.735102178C () pkgs01 ! phx2 ! fedoraproject ! org
[Download RAW message or body]
commit 38c775bb2e45615633a1f31c722a277993cac3da
Author: Alan Pevec <apevec@redhat.com>
Date: Wed Nov 30 23:43:56 2011 +0100
Add back the SysV init scripts
openstack-keystone.spec | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
index f8bd9cd..423a033 100644
--- a/openstack-keystone.spec
+++ b/openstack-keystone.spec
@@ -47,6 +47,7 @@ Requires: python-setuptools
Requires(post): chkconfig
Requires(postun): initscripts
Requires(preun): chkconfig
+Requires(preun): initscripts
Requires(postun): python-iniparse
Requires(pre): shadow-utils
@@ -121,14 +122,23 @@ exit 0
%post
if [ $1 -eq 1 ] ; then
# Initial installation
+%if 0%{?fedora} >= 15
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+%else
+ /sbin/chkconfig --add openstack-keystone
+%endif
fi
%preun
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
+%if 0%{?fedora} >= 15
/bin/systemctl --no-reload disable openstack-keystone.service > /dev/null 2>&1 || :
/bin/systemctl stop openstack-keystone.service > /dev/null 2>&1 || :
+%else
+ /sbin/service openstack-keystone stop >/dev/null 2>&1
+ /sbin/chkconfig --del openstack-keystone
+%endif
fi
%postun
@@ -145,7 +155,11 @@ if not conf.has_option("DEFAULT", "log_dir"):
fp=open(conf_file,"w")
conf.write(fp)
fp.close()'
+%if 0%{?fedora} >= 15
/bin/systemctl try-restart openstack-keystone.service >/dev/null 2>&1 || :
+%else
+ /sbin/service openstack-keystone condrestart >/dev/null 2>&1 || :
+%endif
fi
%files
--
scm-commits mailing list
scm-commits@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/scm-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic