From 6071f10c7e3d375fadab527005a682b0e0e3ff43 Mon Sep 17 00:00:00 2001 From: Phil Cayton Date: Tue, 19 Aug 2014 12:10:49 -0700 Subject: [PATCH] ofed-mic add check for existing ibpd to start function Add a check for an existing ibpd daemon before starting another. This prevents multiple "service ofed-mic start" commands from launching multiple copies of the ibpd daemon, spawning more driver worker threads than intended. --- ofed_scripts/ofed-mic | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 ofed_scripts/ofed-mic diff --git a/ofed_scripts/ofed-mic b/ofed_scripts/ofed-mic old mode 100644 new mode 100755 index 5c9d2f1..4ad6b08 --- a/ofed_scripts/ofed-mic +++ b/ofed_scripts/ofed-mic @@ -178,14 +178,17 @@ start() if [ "$nohost" -eq 0 ]; then echo -n "host" - (/usr/sbin/ibpd &) && + if [ ! "$(pidof /usr/sbin/ibpd)" ]; then + (/usr/sbin/ibpd &) + retval=$? + fi modprobe ib_uverbs && modprobe ibp_server && modprobe ibp_cm_server && modprobe ibp_sa_server && modprobe ibscif - retval=$? + retval+=$? [ $retval -eq 0 ] && eval $_success || eval $_failure fi -- 2.46.0