diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2013-07-23 10:55:20 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-16 11:14:14 +0100 |
commit | 72d6825c24f4c3e4a7a907cf0a09e2e8f7720ae8 (patch) | |
tree | 6d3dda1452ab3ba3975237dde2404a5f7ab402d2 /meta/recipes-core/udev | |
parent | aeeb3418ff08dfd29edc0ce8a41cb6887d4e11fe (diff) | |
download | openembedded-core-72d6825c24f4c3e4a7a907cf0a09e2e8f7720ae8.tar.gz openembedded-core-72d6825c24f4c3e4a7a907cf0a09e2e8f7720ae8.tar.bz2 openembedded-core-72d6825c24f4c3e4a7a907cf0a09e2e8f7720ae8.zip |
udev: remove implicit dependency on initscripts
At some point, the udev was modified to source the functions from
initscripts or lsbinitscripts. This dependency is actually not needed.
If we use udev in a system where initscripts from oe-core is not available,
there will be errors.
This patch fixes this problem by removing the implicit dependency.
[YOCTO #4882]
[YOCTO #4103]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r-- | meta/recipes-core/udev/udev/init | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init index d90d4468e4..e048a171da 100644 --- a/meta/recipes-core/udev/udev/init +++ b/meta/recipes-core/udev/udev/init @@ -9,8 +9,6 @@ # Short-Description: Start udevd, populate /dev and load drivers. ### END INIT INFO -. /etc/init.d/functions - export TZ=/etc/localtime [ -d /sys/class ] || exit 1 @@ -31,6 +29,11 @@ readfiles () { done } +kill_udevd () { + pid=`pidof -x udevd` + [ -n "$pid" ] && kill $pid +} + case "$1" in start) export ACTION=add @@ -89,7 +92,7 @@ case "$1" in fi # make_extra_nodes - killproc udevd > "/dev/null" 2>&1 + kill_udevd > "/dev/null" 2>&1 # trigger the sorted events echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug @@ -114,7 +117,12 @@ case "$1" in $0 start ;; status) - status udevd + pid=`pidof -x udevd` + if [ -n "$pid" ]; then + echo "udevd (pid $pid) is running ..." + else + echo "udevd is stopped" + fi ;; *) echo "Usage: $0 {start|stop|status|restart}" |