[srptools/f17] Minor init script tweaks
Doug Ledford
dledford at fedoraproject.org
Tue Apr 24 16:55:22 UTC 2012
commit bea7ce45f10aca7cbb23682a63fd101fff48b4b8
Author: Doug Ledford <dledford at redhat.com>
Date: Tue Apr 24 12:55:16 2012 -0400
Minor init script tweaks
Signed-off-by: Doug Ledford <dledford at redhat.com>
srptools.init | 11 ++++++-----
srptools.spec | 16 +++++++++++++++-
2 files changed, 21 insertions(+), 6 deletions(-)
---
diff --git a/srptools.init b/srptools.init
index c2d42b5..55298d0 100644
--- a/srptools.init
+++ b/srptools.init
@@ -9,10 +9,10 @@
### BEGIN INIT INFO
# Provides: srpd
# Default-Stop: 0 1 2 3 4 5 6
-# Required-Start: rdma $network
-# Required-Stop: rdma $network
-# Should-Start: opensm
-# Should-Stop: opensm
+# Required-Start: rdma
+# Required-Stop: rdma
+# Should-Start: $network NetworkManager opensm
+# Should-Stop: $network NetworkManager opensm
# Short-Description: Starts and stops the InfiniBand SRP client service
# Description: The InfiniBand SRP client service attaches to SRP devices
# on the InfiniBand fabric and makes them appear as local disks to
@@ -31,7 +31,7 @@ prog=/usr/sbin/srp_daemon.sh
SRP_LOADED=no
if [ -f $RDMA_CONFIG ]; then
- . $CONFIG
+ . $RDMA_CONFIG
if [ "${SRP_LOAD}" == "yes" ]; then
SRP_LOADED=yes
fi
@@ -40,6 +40,7 @@ fi
start()
{
if [ "$SRP_LOADED" == "no" ]; then
+ echo "SRP kernel services not configured, unable to start SRP daemon"
return 6
fi
diff --git a/srptools.spec b/srptools.spec
index d97d04d..6915750 100644
--- a/srptools.spec
+++ b/srptools.spec
@@ -1,6 +1,6 @@
Name: srptools
Version: 0.0.4
-Release: 12%{?dist}
+Release: 13%{?dist}
Summary: Tools for using the InfiniBand SRP protocol devices
Group: System Environment/Base
License: GPLv2 or BSD
@@ -31,6 +31,16 @@ install -p -m 755 -D %{SOURCE1} %{buildroot}%{_initrddir}/srpd
%clean
rm -rf %{buildroot}
+%post
+if [ $1 = 1 ]; then
+ /sbin/chkconfig --add srpd
+fi
+
+%preun
+if [ $1 = 0 ]; then
+ /sbin/chkconfig --del srpd
+fi
+
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/srp_daemon.conf
@@ -44,6 +54,10 @@ rm -rf %{buildroot}
%doc README NEWS ChangeLog COPYING
%changelog
+* Tue Apr 24 2012 Doug Ledford <dledford at redhat.com> - 0.0.4-13
+- Further tweaks to LSB init script headers
+- Add a %%post and %%preun scriptlets to add/remove the init script
+
* Tue Feb 28 2012 Doug Ledford <dledford at redhat.com> - 0.0.4-12
- Fix minor issue in init script LSB headers
More information about the scm-commits
mailing list