From e84bfb30f5d639444367e3af92adc96b08af1e98 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Sun, 13 Feb 2011 22:43:14 +0100 Subject: [PATCH] early: replaced udev with mdev in init.sh --- target/early/initramfs/init.sh | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/target/early/initramfs/init.sh b/target/early/initramfs/init.sh index 6b6700a..beac57d 100644 --- a/target/early/initramfs/init.sh +++ b/target/early/initramfs/init.sh @@ -3,7 +3,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: target/early/initramfs/init.sh -# Copyright (C) 2007 - 2009 The OpenSDE Project +# Copyright (C) 2007 - 2011 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -65,12 +65,14 @@ status title "Preparing /dev" check mount -n -t tmpfs none /dev -check cp -a /lib/udev/devices/* /dev status -title "Starting udev daemon" -echo "" > /sys/kernel/uevent_helper -check udevd --daemon +title "Setting mdev as kernel hotplug helper" +echo "/sbin/mdev" > /proc/sys/kernel/hotplug +status + +title "Populating initial devices" +check mdev -s status if [ -x /sbin/modprobe -a -n "$modules" ]; then @@ -83,8 +85,7 @@ if [ -x /sbin/modprobe -a -n "$modules" ]; then fi title "Triggering coldplug" -check udevadm trigger -check udevadm settle +find /sys/devices -name "uevent" | while read x; do echo -n "add" > $x; done status sleep 2 @@ -102,7 +103,6 @@ if [ ! -e "$root" ]; then # try activating software raids title "Activating RAID devices" modprobe -q md-mod 2> /dev/null - udevadm settle check mdadm -As --auto=yes status fi @@ -118,23 +118,16 @@ if [ ! -e "$root" ]; then if [ "$want_lvm" != no -a -d /etc/lvm/archive ]; then title "Activating LVM devices" modprobe -q dm_mod 2> /dev/null - udevadm settle check lvm vgchange -ay status fi fi if [ -n "$root" ]; then - udevadm settle - # give it a second chance to appear (delay 2s) [ -e "$root" ] || sleep 2; if [ -e "$root" ]; then - /lib/udev/vol_id "$root" > /tmp/$$.vol_id - . /tmp/$$.vol_id - rm /tmp/$$.vol_id - title "Mounting $root (${ID_FS_TYPE:-unknown}) " [ -z "$ID_FS_TYPE" ] || modprobe -q "$ID_FS_TYPE" 2> /dev/null check mount ${ID_FS_TYPE:+-t $ID_FS_TYPE} ${mode:+-o $mode} "$root" /rootfs @@ -158,7 +151,6 @@ if [ "$want_shell" = yes ]; then fi title "Cleaning up" -check killall udevd check mount -t none -o move /dev /rootfs/dev check mount -t none -o move /sys /rootfs/sys check mount -t none -o move /proc /rootfs/proc