Skip to contentSkip to conversation

udev-164: don't hardcode path to pidof

PATCH Superseded Andreas Oberritter 1 participant 2 messages Mar 8, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 udev-164: don't hardcode path to pidof

* pidof lives in /bin, search it in $PATH.
* Assume pidof's presence.
* Remove -e shell option, because pidof may return nonzero.

---
v1->v2: Removed -e.

 meta/recipes-core/udev/udev/init   |    8 +++-----
 meta/recipes-core/udev/udev_164.bb |    2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)
meta/recipes-core/udev/udev/init +3 -5
index 78b5b1c..d521685 100644
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 
 ### BEGIN INIT INFO
 # Provides:          udev
@@ -28,10 +28,8 @@ readfile () {
 }
 
 kill_udevd() {
-	if [ -x /sbin/pidof ]; then
-		pid=`/sbin/pidof -x udevd`
-		[ -n "$pid" ] && kill $pid
-	fi
+	pid=`pidof -x udevd`
+	[ -n "$pid" ] && kill $pid
 }
 
 export ACTION=add
meta/recipes-core/udev/udev_164.bb +1 -1
index b993a13..d661044 100644
@@ -1,6 +1,6 @@
 include udev.inc
 
-PR = "r11"
+PR = "r12"
 
 SRC_URI += "file://udev-166-v4l1-1.patch"
 
Signature · 1 line
1.7.5.4
#1 lore raw
Quoted 3 lines · Andreas Oberritter

* pidof lives in /bin, search it in $PATH.
* Assume pidof's presence.
* Remove -e shell option, because pidof may return nonzero.

I just noticed that v1 was already merged, so I'll send an incremental patch in a minute.

Regards,
Andreas