3
# Bring up/down the ibacm daemon
5
# chkconfig: 2345 25 75
6
# description: Starts/Stops InfiniBand ACM service
10
# Default-Start: 2 3 4 5
12
# Required-Start: $network $remote_fs
13
# Required-Stop: $network $remote_fs
16
# Short-Description: Starts and stops the InfiniBand ACM service
17
# Description: The InfiniBand ACM service provides a user space implementation
18
# of something resembling an ARP cache for InfiniBand SA queries and
22
pidfile=/var/run/ibacm.pid
23
subsys=/var/lock/subsys/ibacm
25
daemon() { /sbin/daemon ${1+"$@"}; }
27
if [ -s /etc/init.d/functions ]; then
28
# RHEL / CentOS / SL / Fedora
29
. /etc/init.d/functions
30
_daemon() { daemon ${1+"$@"}; }
31
_checkpid() { checkpid `cat $pidfile`; }
32
_success() { success; echo; }
33
_failure() { failure; echo; }
34
elif [ -s /lib/lsb/init-functions ]; then
35
# SLES / OpenSuSE / Debian
36
. /lib/lsb/init-functions
37
_daemon() { /sbin/start_daemon ${1+"$@"}; }
38
_checkpid() { checkproc -p $pidfile /usr/sbin/ibacm; }
39
_success() { log_success_msg; }
40
_failure() { log_failure_msg; }
41
elif [ -s /etc/rc.status ]; then
44
_daemon() { /sbin/start_daemon ${1+"$@"}; }
45
_checkpid() { checkproc -p $pidfile /usr/sbin/ibacm; }
46
_success() { rc_status -v; }
47
_failure() { rc_status -v; }
52
echo -n "Starting ibacm daemon:"
53
_daemon /usr/sbin/ibacm
54
if [[ $RETVAL -eq 0 ]]; then
63
echo -n "Stopping ibacm daemon:"
64
killproc -p $pidfile ibacm
65
if [[ $RETVAL -eq 0 ]]; then
75
echo -n "Checking for ibacm service "
76
if [ ! -f $subsys -a ! -f $pidfile ]; then
78
elif [ -f $pidfile ]; then
81
elif [ -f $subsys ]; then
86
if [[ $RETVAL -eq 0 ]]; then
101
[ -e $subsys ] && restart || return 0
107
echo "Usage: `basename $0` {start|stop|restart|condrestart|try-restart|force-reload|status}"
113
start|stop|restart|condrestart|try-restart|force-reload)
114
[ `id -u` != "0" ] && exit 4 ;;
127
condrestart | try-restart | force-reload)