[ofa-general] [PATCH] opensm/configure.in: replace CONF_DIR config var by OSM_CONFIG_DIR

Sasha Khapyorsky sashak at voltaire.com
Tue Apr 1 10:52:46 PDT 2008


Replace CONF_DIR config variable by OSM_CONFIG_DIR in substitution
patterns. Remove not needed OPENSM_CONF_SUB_DIR var.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/configure.in                  |    8 +++-----
 opensm/man/opensm.8.in               |   16 ++++++++--------
 opensm/opensm.spec.in                |    8 ++++----
 opensm/scripts/opensmd.in            |    4 ++--
 opensm/scripts/redhat-opensm.init.in |    4 ++--
 5 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/opensm/configure.in b/opensm/configure.in
index 0da402a..1f2bed5 100644
--- a/opensm/configure.in
+++ b/opensm/configure.in
@@ -87,7 +87,7 @@ conf_dir_tmp1="`eval echo ${sysconfdir} | sed 's/^NONE/$ac_default_prefix/'`"
 SYS_CONFIG_DIR="`eval echo $conf_dir_tmp1`"
 
 dnl Check for a different subdir for the config files.
-OPENSM_CONF_SUB_DIR=opensm
+OPENSM_CONFIG_DIR=$SYS_CONFIG_DIR/opensm
 AC_MSG_CHECKING(for --with-opensm-conf-sub-dir)
 AC_ARG_WITH(opensm-conf-sub-dir,
     AC_HELP_STRING([--with-opensm-conf-sub-dir=dir],
@@ -96,17 +96,15 @@ AC_ARG_WITH(opensm-conf-sub-dir,
     no)
         ;;
     *)
-        OPENSM_CONF_SUB_DIR=$withval
+        OPENSM_CONFIG_DIR=$SYS_CONFIG_DIR/$withval
         ;;
     esac ]
 )
-OPENSM_CONFIG_DIR=$SYS_CONFIG_DIR/$OPENSM_CONF_SUB_DIR
 AC_MSG_RESULT($OPENSM_CONFIG_DIR)
 AC_DEFINE_UNQUOTED(OPENSM_CONFIG_DIR,
 	["$OPENSM_CONFIG_DIR"],
 	[Define OpenSM config directory])
-AC_SUBST(OPENSM_CONF_SUB_DIR)
-AC_SUBST(CONF_DIR,$OPENSM_CONFIG_DIR)
+AC_SUBST(OPENSM_CONFIG_DIR)
 
 dnl Check for a different default node name map file
 NODENAMEMAPFILE=ib-node-name-map
diff --git a/opensm/man/opensm.8.in b/opensm/man/opensm.8.in
index 93fa95c..e93844d 100644
--- a/opensm/man/opensm.8.in
+++ b/opensm/man/opensm.8.in
@@ -201,21 +201,21 @@ is accumulative.
 .TP
 \fB\-P\fR, \fB\-\-Pconfig\fR
 This option defines the optional partition configuration file.
-The default name is \fB\%@CONF_DIR@/@PARTITION_CONFIG_FILE@\fP.
+The default name is \fB\%@OPENSM_CONFIG_DIR@/@PARTITION_CONFIG_FILE@\fP.
 .TP
 .BI --prefix_routes_file= path
 Prefix routes control how the SA responds to path record queries for
 off-subnet DGIDs.  By default, the SA fails such queries. The
 .B PREFIX ROUTES
 section below describes the format of the configuration file.
-The default path is \fB\%@CONF_DIR@/prefix\-routes.conf\fP.
+The default path is \fB\%@OPENSM_CONFIG_DIR@/prefix\-routes.conf\fP.
 .TP
 \fB\-Q\fR, \fB\-\-qos\fR
 This option enables QoS setup. It is disabled by default.
 .TP
 \fB\-Y\fR, \fB\-\-qos_policy_file\fR
 This option defines the optional QoS policy file. The default
-name is \fB\%@CONF_DIR@/@QOS_POLICY_FILE@\fP.
+name is \fB\%@OPENSM_CONFIG_DIR@/@QOS_POLICY_FILE@\fP.
 .TP
 \fB\-N\fR, \fB\-\-no_part_enforce\fR
 This option disables partition enforcement on switch external ports.
@@ -331,7 +331,7 @@ logrotate purposes.
 .SH PARTITION CONFIGURATION
 .PP
 The default name of OpenSM partitions configuration file is
-\fB\%@CONF_DIR@/@PARTITION_CONFIG_FILE@\fP. The default may be changed by using
+\fB\%@OPENSM_CONFIG_DIR@/@PARTITION_CONFIG_FILE@\fP. The default may be changed by using
 --Pconfig (-P) option with OpenSM.
 
 The default partition will be created by OpenSM unconditionally even
@@ -926,19 +926,19 @@ Both or one of options -U and -M can be specified together with \'-R file\'.
 
 .SH FILES
 .TP
-.B @CONF_DIR@/@NODENAMEMAPFILE@
+.B @OPENSM_CONFIG_DIR@/@NODENAMEMAPFILE@
 default node name map file.  See ibnetdiscover for more information on format.
 
 .TP
-.B @CONF_DIR@/@PARTITION_CONFIG_FILE@
+.B @OPENSM_CONFIG_DIR@/@PARTITION_CONFIG_FILE@
 default partition config file
 
 .TP
-.B @CONF_DIR@/@QOS_POLICY_FILE@
+.B @OPENSM_CONFIG_DIR@/@QOS_POLICY_FILE@
 default QOS policy config file
 
 .TP
-.B @CONF_DIR@/prefix-routes.conf
+.B @OPENSM_CONFIG_DIR@/prefix-routes.conf
 default prefix routes file.
 
 .SH AUTHORS
diff --git a/opensm/opensm.spec.in b/opensm/opensm.spec.in
index 882e6e4..feabfef 100644
--- a/opensm/opensm.spec.in
+++ b/opensm/opensm.spec.in
@@ -94,9 +94,9 @@ if [ -f /etc/redhat-release -o -s /etc/redhat-release ]; then
 else
     REDHAT=""
 fi
-mkdir -p $etc/{init.d, at OPENSM_CONF_SUB_DIR@,logrotate.d}
+mkdir -p $etc/{init.d,logrotate.d} @OPENSM_CONFIG_DIR@
 install -m 755 scripts/${REDHAT}opensm.init $etc/init.d/opensmd
-install -m 644 scripts/opensm.conf $etc/@OPENSM_CONF_SUB_DIR@/opensm.conf
+install -m 644 scripts/opensm.conf @OPENSM_CONFIG_DIR@/opensm.conf
 install -m 644 scripts/opensm.logrotate $etc/logrotate.d/opensm
 install -m 755 scripts/sldd.sh $RPM_BUILD_ROOT%{_sbindir}/sldd.sh
 
@@ -128,10 +128,10 @@ fi
 %doc AUTHORS COPYING README
 %{_sysconfdir}/init.d/opensmd
 %{_sbindir}/sldd.sh
-%config(noreplace) %{_sysconfdir}/@OPENSM_CONF_SUB_DIR@/opensm.conf
+%config(noreplace) @OPENSM_CONFIG_DIR@/opensm.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/opensm
 %dir /var/cache/opensm
-%dir %{_sysconfdir}/@OPENSM_CONF_SUB_DIR@
+%dir @OPENSM_CONFIG_DIR@
 
 %files libs
 %defattr(-,root,root,-)
diff --git a/opensm/scripts/opensmd.in b/opensm/scripts/opensmd.in
index 434a92c..7e5d868 100755
--- a/opensm/scripts/opensmd.in
+++ b/opensm/scripts/opensmd.in
@@ -28,13 +28,13 @@
 #
 #
 # processname: @sbindir@/opensm
-# config: @sysconfig@/opensm.conf
+# config: @OPENSM_CONFIG_DIR@/opensm.conf
 # pidfile: /var/run/opensm.pid
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 
-CONFIG=@sysconfdir@/@OPENSM_CONF_SUB_DIR@/opensm.conf
+CONFIG=@OPENSM_CONFIG_DIR@/opensm.conf
 
 if [ ! -f $CONFIG ]; then
     exit 0
diff --git a/opensm/scripts/redhat-opensm.init.in b/opensm/scripts/redhat-opensm.init.in
index 689ffa0..5cc9079 100755
--- a/opensm/scripts/redhat-opensm.init.in
+++ b/opensm/scripts/redhat-opensm.init.in
@@ -38,7 +38,7 @@
 #  $Id: openib-1.0-opensm.init,v 1.5 2006/08/02 18:18:23 dledford Exp $
 #
 # processname: @sbindir@/opensm
-# config: @sysconfdir@/@OPENSM_CONF_SUB_DIR@/opensm.conf
+# config: @OPENSM_CONFIG_DIR@/opensm.conf
 # pidfile: /var/run/opensm.pid
 
 prefix=@prefix@
@@ -46,7 +46,7 @@ exec_prefix=@exec_prefix@
 
 . /etc/rc.d/init.d/functions
 
-CONFIG=@sysconfdir@/@OPENSM_CONF_SUB_DIR@/opensm.conf
+CONFIG=@OPENSM_CONFIG_DIR@/opensm.conf
 if [ ! -f $CONFIG ]; then
     exit 0
 fi
-- 
1.5.4.1.122.gaa8d




More information about the general mailing list