On 16:57 Wed 22 Oct     , Yevgeny Kliteynik wrote:
> Hi Sasha,
> 
> Following my previous questions, how about the following patch:
> 
> Use similar opensm config file name for redhat and suse distros,
> and pass this config file to opensm wit the "--config" option.
> 
> Signed-off-by: Yevgeny Kliteynik <[EMAIL PROTECTED]>
> ---
>  opensm/scripts/opensm.init.in        |    6 +++---
>  opensm/scripts/redhat-opensm.init.in |    4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/opensm/scripts/opensm.init.in b/opensm/scripts/opensm.init.in
> index c31f017..af0fd19 100644
> --- a/opensm/scripts/opensm.init.in
> +++ b/opensm/scripts/opensm.init.in
> @@ -53,13 +53,13 @@ if [[ -s /etc/rc.status ]]; then
>      failure() { rc_status -v; }
>      success() { rc_status -v; }
>  fi
> -if [[ -s /etc/sysconfig/opensm ]]; then
> -    . /etc/sysconfig/opensm
> +if [ -s /etc/sysconfig/opensm.conf ]; then
> +    OPTIONS="--config /etc/sysconfig/opensm.conf"

Why we should specify OpenSM config file explicitly? It has the default
location (/etc/opensm/opensm.conf or something).

It is not the same as /etc/sysconfig/blahblah script where $OPTIONS
environment variable could be defined.

Again, I'm fine with removing all this /etc/sysconfig/* stuff completely
if nobody uses this.

Sasha

>  fi
> 
>  start () {
>      echo -n "Starting opensm: "
> -    @sbindir@/opensm -B $OPTIONS > /dev/null
> +    @sbindir@/opensm --daemon $OPTIONS > /dev/null
>      if [[ $RETVAL -eq 0 ]]; then
>          touch /var/lock/subsys/opensm
>          success
> diff --git a/opensm/scripts/redhat-opensm.init.in 
> b/opensm/scripts/redhat-opensm.init.in
> index aad783b..a5755ef 100755
> --- a/opensm/scripts/redhat-opensm.init.in
> +++ b/opensm/scripts/redhat-opensm.init.in
> @@ -49,7 +49,7 @@ [EMAIL PROTECTED]@
> 
>  [EMAIL PROTECTED]@/sysconfig/opensm.conf
>  if [ -f $CONFIG ]; then
> -    . $CONFIG
> +    OPTIONS="--config ${CONFIG}"
>  fi
> 
>  [EMAIL PROTECTED]@/opensm
> @@ -147,7 +147,7 @@ start()
> 
>          # Start opensm
>       echo -n "Starting IB Subnet Manager"
> -        $prog --daemon ${HONORE_GUID2LID} > /dev/null
> +        $prog --daemon ${HONORE_GUID2LID} ${OPTIONS} > /dev/null
>          cnt=0; alive=0
>          while [ $cnt -lt 6 -a $alive -ne 1 ]; do
>               echo -n ".";
> -- 
> 1.5.1.4
> 
_______________________________________________
general mailing list
general@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to