summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-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}"