aboutsummaryrefslogtreecommitdiffstats
path: root/package/udev/init-udev
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 00:59:10 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-14 00:59:10 +0000
commit0a4b6a3bc7e9f325efbf8f3b01e90c762172e7d7 (patch)
tree6d5f46330f166e7ef7efcad951a0b4520848618b /package/udev/init-udev
parent5d8342c7f74109ecdcc6049e3972aac2e6db7756 (diff)
downloadbuildroot-novena-0a4b6a3bc7e9f325efbf8f3b01e90c762172e7d7.tar.gz
buildroot-novena-0a4b6a3bc7e9f325efbf8f3b01e90c762172e7d7.zip
Upgrade to udev-101. We also create and init script that actually works and has been tested in multiple PowerPC embedded platforms. We also add a new config option to build the volume_id library which will be used by D-Bus and HAL.
Diffstat (limited to 'package/udev/init-udev')
-rwxr-xr-xpackage/udev/init-udev74
1 files changed, 37 insertions, 37 deletions
diff --git a/package/udev/init-udev b/package/udev/init-udev
index 5f51c5d3c..220fbcef6 100755
--- a/package/udev/init-udev
+++ b/package/udev/init-udev
@@ -18,17 +18,15 @@
# old kernels don't use udev
case $(uname -r) in
-2.6*|2.7*) ;;
-*) exit 0;;
+ 2.6*|2.7*) ;;
+ *) exit 0;;
esac
# Check for missing binaries
-UDEV_BIN=/sbin/udev
+UDEV_BIN=/sbin/udevd
test -x $UDEV_BIN || exit 5
UDEVSTART_BIN=/sbin/udevstart
test -x $UDEVSTART_BIN || exit 5
-UDEVD_BIN=/sbin/udevd
-test -x $UDEVD_BIN || exit 5
# Check for config file and read it
UDEV_CONFIG=/etc/udev/udev.conf
@@ -40,42 +38,44 @@ SYSFS_DIR=/sys
case "$1" in
start)
- # mount sysfs if it's not yet mounted
- if [ ! -d $SYSFS_DIR ]; then
- echo "${0}: SYSFS_DIR \"$SYSFS_DIR\" not found"
- exit 1
- fi
- grep -q "^sysfs $SYSFS_DIR" /proc/mounts ||
- mount -t sysfs /sys /sys ||
- exit 1
+ # mount sysfs if it's not yet mounted
+ if [ ! -d $SYSFS_DIR ]; then
+ echo "${0}: SYSFS_DIR \"$SYSFS_DIR\" not found"
+ exit 1
+ fi
+ grep -q "^sysfs $SYSFS_DIR" /proc/mounts ||
+ mount -t sysfs /sys /sys ||
+ exit 1
- # mount $udev_root as ramfs if it's not yet mounted
- # we know 2.6 kernels always support ramfs
- if [ ! -d $udev_root ]; then
- echo "${0}: udev_root \"$udev_root\" not found"
- exit 1
- fi
- grep -q "^udev $udev_root" /proc/mounts ||
- mount -t ramfs udev $udev_root ||
- exit 1
+ # mount $udev_root as ramfs if it's not yet mounted
+ # we know 2.6 kernels always support ramfs
+ if [ ! -d $udev_root ]; then
+ echo "${0}: udev_root \"$udev_root\" not found"
+ exit 1
+ fi
+ grep -q "^udev $udev_root" /proc/mounts ||
+ mount -t ramfs udev $udev_root ||
+ exit 1
- # heck, go whole-hog: use only new style hotplug
- # echo $UDEV_BIN > /proc/sys/kernel/hotplug
+ mkdir $udev_root/pts $udev_root/shm
- # populate /dev (normally)
- echo -n "Populating $udev_root using udev... "
+ # populate /dev (normally)
+ echo -n "Populating $udev_root using udev: "
+ echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+ $UDEV_BIN -d || (echo "FAIL" && exit 1)
$UDEVSTART_BIN || (echo "FAIL" && exit 1)
- mkdir $udev_root/pts $udev_root/shm
- # start daemon
- $UDEVD_BIN --daemon || (echo "udevd FAIL" && exit 1)
- echo "done"
- mount -a
- ;;
+ echo "done"
+ ;;
stop)
- # do nothing
- ;;
+ # Stop execution of events
+ udevcontrol stop_exec_queue
+ killall udevd
+ ;;
*)
- echo "Usage: $0 {start|stop}"
- exit 1
- ;;
+ echo "Usage: $0 {start|stop}"
+ exit 1
+ ;;
esac
+
+
+exit 0