Patchwork [v2] udev-164: don't hardcode path to pidof

login
register
mail settings
Submitter Andreas Oberritter
Date March 8, 2012, 9:12 p.m.
Message ID <1331241161-13878-1-git-send-email-obi@opendreambox.org>
Download mbox | patch
Permalink /patch/22921/
State New
Headers show

Comments

Andreas Oberritter - March 8, 2012, 9:12 p.m.
* pidof lives in /bin, search it in $PATH.
* Assume pidof's presence.
* Remove -e shell option, because pidof may return nonzero.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
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(-)
Andreas Oberritter - March 8, 2012, 9:19 p.m.
On 08.03.2012 22:12, Andreas Oberritter wrote:
> * 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

Patch

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index 78b5b1c..d521685 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -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
diff --git a/meta/recipes-core/udev/udev_164.bb b/meta/recipes-core/udev/udev_164.bb
index b993a13..d661044 100644
--- a/meta/recipes-core/udev/udev_164.bb
+++ b/meta/recipes-core/udev/udev_164.bb
@@ -1,6 +1,6 @@ 
 include udev.inc
 
-PR = "r11"
+PR = "r12"
 
 SRC_URI += "file://udev-166-v4l1-1.patch"