Skip to contentSkip to conversation

ibacm: Fix service start_daemon call on Debian

PATCH New Benjamin Drung 1 participant 2 messages Jul 12, 2017 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ibacm: Fix service start_daemon call on Debian

The script start_daemon does not exist on Debian/Ubuntu. /lib/lsb/init-functions defines a start_daemon functions that calls /sbin/start_daemon on openSUSE. Thus call the start_daemon LSB function instead.

---
 ibacm/ibacm.init.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ibacm/ibacm.init.in +1 -1
index bd7b70a1..e53ce1d6 100644
@@ -35,7 +35,7 @@ if [ -s /etc/init.d/functions ]; then
 elif [ -s /lib/lsb/init-functions ]; then
 	# SLES / OpenSuSE / Debian
 	. /lib/lsb/init-functions
-	_daemon()   { /sbin/start_daemon ${1+"$@"}; }
+	_daemon()   { start_daemon "$@"; }
         _checkpid() { checkproc -p $pidfile @prefix@/sbin/ibacm; }
 	_success()  { log_success_msg; }
 	_failure()  { log_failure_msg; }
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170712154255.21296-1-benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org

#2 lore raw

PATCH 2/2 iwpmd: Support Debian/Ubuntu in sysvinit service

The sysvinit script for iwpmd supports only RedHat and SUSE by checking the running distribution. Add support for Debian/Ubuntu by using /lib/lsb/init-functions as default (on all non RedHat systems).

The binary pidofproc does not exits on Debian/Ubuntu, but /lib/lsb/init-functions defines a pidofproc function instead (which calls /sbin/pidofproc on openSUSE).

---
 iwpmd/iwpmd_init | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
iwpmd/iwpmd_init +3 -2
index 88e63c10..0d2559e9 100755
@@ -29,12 +29,13 @@ if [ -f "/etc/redhat-release" ]; then
 	STATUSD=status
 	GETPID=/sbin/pidof
 
-elif [ -f "/etc/SuSE-release" ]; then
+else
+	# Debian / openSUSE / Ubuntu
 	. /lib/lsb/init-functions
 	STARTD=start_daemon
 	STOPD=killproc
 	STATUSD=/sbin/checkproc
-	GETPID=/sbin/pidofproc
+	GETPID=pidofproc
 fi
 
 check() {
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html