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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).

Signed-off-by: Benjamin Drung <benjamin.drung@xxxxxxxxxxxxxxxx>
---
 iwpmd/iwpmd_init | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/iwpmd/iwpmd_init b/iwpmd/iwpmd_init
index 88e63c10..0d2559e9 100755
--- a/iwpmd/iwpmd_init
+++ b/iwpmd/iwpmd_init
@@ -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() {
-- 
2.11.0

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux