diff options
author | Lukc <lukc@upyum.com> | 2010-12-11 19:15:23 +0100 |
---|---|---|
committer | Lukc <lukc@upyum.com> | 2010-12-11 19:15:35 +0100 |
commit | 6d908a38e05b9d4135c65d23114a5874215b5bb8 (patch) | |
tree | b5e6da6d95b9a1235d82032b509b80483a886ff5 /udev/start_udev | |
download | base-6d908a38e05b9d4135c65d23114a5874215b5bb8.tar.gz base-6d908a38e05b9d4135c65d23114a5874215b5bb8.tar.bz2 base-6d908a38e05b9d4135c65d23114a5874215b5bb8.tar.xz base-6d908a38e05b9d4135c65d23114a5874215b5bb8.zip |
Engagement initial.
Diffstat (limited to 'udev/start_udev')
-rw-r--r-- | udev/start_udev | 37 |
1 files changed, 37 insertions, 0 deletions
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 |