Browse Source

early: replaced udev with mdev in init.sh

user/chris/test/patchcksum
Christian Wiese 14 years ago
parent
commit
e84bfb30f5
1 changed files with 8 additions and 16 deletions
  1. +8
    -16
      target/early/initramfs/init.sh

+ 8
- 16
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

Loading…
Cancel
Save