rpms/opensm/devel opensm.initd,1.1,1.2
Doug Ledford
dledford at fedoraproject.org
Wed Sep 17 03:07:10 UTC 2008
- Previous message (by thread): rpms/arora/devel .cvsignore, NONE, 1.1 Makefile, NONE, 1.1 sources, NONE, 1.1
- Next message (by thread): rpms/gstm/devel gstm-1.2-autoconf.patch,NONE,1.1 gstm.spec,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dledford
Update of /cvs/extras/rpms/opensm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4900
Modified Files:
opensm.initd
Log Message:
Update init script to fix bug 453977
Index: opensm.initd
===================================================================
RCS file: /cvs/extras/rpms/opensm/devel/opensm.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- opensm.initd 30 Jun 2008 23:33:50 -0000 1.1
+++ opensm.initd 17 Sep 2008 03:06:39 -0000 1.2
@@ -19,6 +19,7 @@
prog=/usr/sbin/opensm
CONFIG=/etc/rdma/opensm.conf
PID_FILE=/var/run/opensm.pid
+ACTION=$1
start()
{
@@ -32,9 +33,9 @@
[ -f /var/lock/subsys/opensm ] && return 0
# Start opensm
echo -n "Starting IB Subnet Manager:"
- $prog $OPTIONS > /dev/null 2>&1 &
- OSM_PID=$!
+ $prog $OPTIONS > /dev/null 2>&1
sleep 1
+ OSM_PID=`pidof $prog`
checkpid $OSM_PID
RC=$?
[ $RC -eq 0 ] && echo_success || echo_failure
@@ -63,18 +64,23 @@
# Kill opensm
kill -15 $OSM_PID > /dev/null 2>&1
cnt=0
- while [ $cnt -lt 6 -a checkpid $OSM_PID -eq 0 ]; do
+ while [ $cnt -lt 6 ]; do
+ checkpid $OSM_PID
+ if [ $? -ne 0 ]; then
+ break
+ fi
echo -n "."
sleep 1
- let cnt++
+ cnt=$(( $cnt + 1 ))
done
- if [ checkpid $OSM_PID -eq 0 ]; then
+ checkpid $OSM_PID
+ if [ $? -eq 0 ]; then
kill -KILL $OSM_PID > /dev/null 2>&1
echo -n "+"
sleep 1
fi
- checkpid $pid
+ checkpid $OSM_PID
DEAD=$?
if [ $DEAD -eq 0 ]; then
echo_failure
- Previous message (by thread): rpms/arora/devel .cvsignore, NONE, 1.1 Makefile, NONE, 1.1 sources, NONE, 1.1
- Next message (by thread): rpms/gstm/devel gstm-1.2-autoconf.patch,NONE,1.1 gstm.spec,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list