From: Sean Hefty Date: Wed, 6 Jun 2012 23:10:22 +0000 (-0700) Subject: Configure init script based on target OS X-Git-Tag: v1.0.7~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b269c99716b03631d584d0ebd11c2a7af0b402c4;p=~shefty%2Fibacm.git Configure init script based on target OS 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 --- diff --git a/configure.in b/configure.in index 063b834..57bdbcd 100644 --- a/configure.in +++ b/configure.in @@ -65,5 +65,14 @@ if test "x$rdmadir" = "x"; then fi AC_SUBST(sbindir) +AC_ARG_VAR(rdmascript, [Required dependency script name]) +if test "x$rdmascript" = "x"; then + if test -n "`grep -q 'release 6' /etc/redhat-release`"; then + AC_SUBST(rdmascript, rdma) + else + AC_SUBST(rdmascript, openibd) + fi +fi + AC_CONFIG_FILES([Makefile ibacm.spec ibacm.init]) AC_OUTPUT diff --git a/ibacm.init.in b/ibacm.init.in index b4e807f..bd2d1bd 100644 --- a/ibacm.init.in +++ b/ibacm.init.in @@ -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