]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
Configure init script based on target OS
authorSean Hefty <sean.hefty@intel.com>
Wed, 6 Jun 2012 23:10:22 +0000 (16:10 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 6 Jun 2012 23:10:22 +0000 (16:10 -0700)
The init script either needs to depend on 'rdma' or 'openibd'
scripts being started.  The actual script depends on the target
operating system.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
configure.in
ibacm.init.in

index 063b834809d8b5172775dd7fd535560c8b02b7b3..57bdbcd42ed5703a542387b7f97617d3da656ab2 100644 (file)
@@ -65,5 +65,14 @@ if test "x$rdmadir" = "x"; then
 fi\r
 AC_SUBST(sbindir)\r
 \r
+AC_ARG_VAR(rdmascript, [Required dependency script name])\r
+if test "x$rdmascript" = "x"; then\r
+   if test -n "`grep -q 'release 6' /etc/redhat-release`"; then\r
+      AC_SUBST(rdmascript, rdma)\r
+   else\r
+      AC_SUBST(rdmascript, openibd)\r
+   fi\r
+fi\r
+\r
 AC_CONFIG_FILES([Makefile ibacm.spec ibacm.init])\r
 AC_OUTPUT\r
index b4e807fc07ade7ea04d0e050f13ae5a9094ffde4..bd2d1bde808d790ea4affaf9d957f70fde459e79 100644 (file)
@@ -9,8 +9,8 @@
 # Provides:       ibacm
 # Default-Start: 2 3 4 5
 # Default-Stop: 0 1 6
-# Required-Start: rdma $network
-# Required-Stop: rdma $network
+# Required-Start: @rdmascript@ $network
+# Required-Stop: @rdmascript@ $network
 # Should-Start:
 # Should-Stop:
 # Short-Description: Starts and stops the InfiniBand ACM service