summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2013-07-23 10:55:20 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-16 11:14:35 +0100
commit11660bc1c638a5b76c7d83010a61f1b59e9379e1 (patch)
tree862e4e5d759cf45eb3e0b49eac39d0a0ff47de75 /meta/recipes-core/udev
parent7ab93ec66424282693be45e1e4a222c8bf3b3726 (diff)
downloadpoky-11660bc1c638a5b76c7d83010a61f1b59e9379e1.tar.gz
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] (From OE-Core rev: 72d6825c24f4c3e4a7a907cf0a09e2e8f7720ae8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r--meta/recipes-core/udev/udev/init16
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 @@
9# Short-Description: Start udevd, populate /dev and load drivers. 9# Short-Description: Start udevd, populate /dev and load drivers.
10### END INIT INFO 10### END INIT INFO
11 11
12. /etc/init.d/functions
13
14export TZ=/etc/localtime 12export TZ=/etc/localtime
15 13
16[ -d /sys/class ] || exit 1 14[ -d /sys/class ] || exit 1
@@ -31,6 +29,11 @@ readfiles () {
31 done 29 done
32} 30}
33 31
32kill_udevd () {
33 pid=`pidof -x udevd`
34 [ -n "$pid" ] && kill $pid
35}
36
34case "$1" in 37case "$1" in
35 start) 38 start)
36 export ACTION=add 39 export ACTION=add
@@ -89,7 +92,7 @@ case "$1" in
89 fi 92 fi
90 93
91 # make_extra_nodes 94 # make_extra_nodes
92 killproc udevd > "/dev/null" 2>&1 95 kill_udevd > "/dev/null" 2>&1
93 96
94 # trigger the sorted events 97 # trigger the sorted events
95 echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug 98 echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
@@ -114,7 +117,12 @@ case "$1" in
114 $0 start 117 $0 start
115 ;; 118 ;;
116 status) 119 status)
117 status udevd 120 pid=`pidof -x udevd`
121 if [ -n "$pid" ]; then
122 echo "udevd (pid $pid) is running ..."
123 else
124 echo "udevd is stopped"
125 fi
118 ;; 126 ;;
119 *) 127 *)
120 echo "Usage: $0 {start|stop|status|restart}" 128 echo "Usage: $0 {start|stop|status|restart}"