ibacm: Fix service start_daemon call on Debian
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
@@ -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
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
@@ -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