[oe-commits] Andreas Oberritter : udev-173: don't hardcode path to pidof

git at git.openembedded.org git at git.openembedded.org
Fri Mar 9 06:54:41 UTC 2012


Module: meta-openembedded.git
Branch: master
Commit: 8b5006510a73d04f023554b2126b0858f7bbd68a
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=8b5006510a73d04f023554b2126b0858f7bbd68a

Author: Andreas Oberritter <obi at opendreambox.org>
Date:   Thu Mar  8 21:15:31 2012 +0000

udev-173: 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.

Signed-off-by: Andreas Oberritter <obi at opendreambox.org>
Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>

---

 meta-oe/recipes-core/udev/udev/init   |    8 +++-----
 meta-oe/recipes-core/udev/udev_173.bb |    2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/meta-oe/recipes-core/udev/udev/init b/meta-oe/recipes-core/udev/udev/init
index ecc357d..d160300 100644
--- a/meta-oe/recipes-core/udev/udev/init
+++ b/meta-oe/recipes-core/udev/udev/init
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 
 ### BEGIN INIT INFO
 # Provides:          udev
@@ -18,10 +18,8 @@ export TZ=/etc/localtime
 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
 
 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-oe/recipes-core/udev/udev_173.bb b/meta-oe/recipes-core/udev/udev_173.bb
index 5c5ce26..b7d7ed3 100644
--- a/meta-oe/recipes-core/udev/udev_173.bb
+++ b/meta-oe/recipes-core/udev/udev_173.bb
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
 # Needed for udev-extras
 DEPENDS = "gperf-native usbutils acl glib-2.0"
 
-PR = "r3"
+PR = "r4"
 
 # version specific SRC_URI
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \





More information about the Openembedded-commits mailing list