From 6d908a38e05b9d4135c65d23114a5874215b5bb8 Mon Sep 17 00:00:00 2001 From: Lukc Date: Sat, 11 Dec 2010 19:15:23 +0100 Subject: Engagement initial. --- udev/start_udev | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 udev/start_udev (limited to 'udev/start_udev') diff --git a/udev/start_udev b/udev/start_udev new file mode 100644 index 0000000..111533f --- /dev/null +++ b/udev/start_udev @@ -0,0 +1,37 @@ +#!/bin/sh + +# mount /dev as a devtmpfs or tmpfs, depending on current kernel capability +# mount only, if it's not already mounted (e.g. after handover from initramfs) +# note: some video drivers require exec access in /dev +if ! /bin/mountpoint -q /dev ; then + if ! /bin/sed -n '/devtmpfs/q1' /proc/filesystems ; then + UDEVFS=devtmpfs + else + UDEVFS=tmpfs + fi + + /bin/mount -n -t $UDEVFS udev /dev -o exec,nosuid,mode=0755,size=8M + + if [ $UDEVFS = "tmpfs" ]; then + /bin/cp -a /lib/udev/devices/{console,null,kmsg} /dev/ + fi +fi + +# make sure hotplugger is not set +echo > /proc/sys/kernel/hotplug + +# since v155, udevd automatically copies /lib/udev/devices +# and creates /proc/{kcore,self/fd/{0,1,2}} symlinks + +# launch udev daemon +/sbin/udevd --daemon + +# coldplug devices and wait for the queue to be processed +/sbin/udevadm trigger --type=subsystems --action=add +/sbin/udevadm settle +/sbin/udevadm trigger --type=devices --action=add +/sbin/udevadm settle + +# retry any failures +/sbin/udevadm trigger --type=failed --action=add +/sbin/udevadm settle -- cgit v1.2.3-70-g09d2