[ofa-general] [PATCH] opensm/redhat-opensm.init.in: make config file optional

Sasha Khapyorsky sashak at voltaire.com
Sat Sep 13 11:20:29 PDT 2008


This file is not installed by default, so make it optional for the
script.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/scripts/redhat-opensm.init.in |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/opensm/scripts/redhat-opensm.init.in b/opensm/scripts/redhat-opensm.init.in
index 5526e44..d4cc580 100755
--- a/opensm/scripts/redhat-opensm.init.in
+++ b/opensm/scripts/redhat-opensm.init.in
@@ -47,12 +47,10 @@ exec_prefix=@exec_prefix@
 . /etc/rc.d/init.d/functions
 
 CONFIG=@sysconfdir@/sysconfig/opensm.conf
-if [ ! -f $CONFIG ]; then
-    exit 0
+if [ -f $CONFIG ]; then
+    . $CONFIG
 fi
 
-. $CONFIG
-
 prog=@sbindir@/opensm
 bin=${prog##*/}
 
-- 
1.5.4.rc2.60.gb2e62




More information about the general mailing list