2006-08-03 15:43:56 +02:00
|
|
|
#!/bin/sh
|
2006-02-23 18:19:35 +01:00
|
|
|
|
2010-12-02 16:08:16 +01:00
|
|
|
# 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
|
|
|
|
fi
|
|
|
|
|
|
|
|
# make sure hotplugger is not set
|
2006-08-03 15:43:56 +02:00
|
|
|
echo > /proc/sys/kernel/hotplug
|
2006-02-23 18:19:35 +01:00
|
|
|
|
2010-12-02 16:08:16 +01:00
|
|
|
# since v155, udevd automatically copies /lib/udev/devices
|
|
|
|
# and creates /proc/{kcore,self/fd/{0,1,2}} symlinks
|
2006-02-23 18:19:35 +01:00
|
|
|
|
2006-08-03 15:43:56 +02:00
|
|
|
# launch udev daemon
|
|
|
|
/sbin/udevd --daemon
|
2006-02-23 18:19:35 +01:00
|
|
|
|
2006-08-03 15:43:56 +02:00
|
|
|
# coldplug devices and wait for the queue to be processed
|
2010-12-02 16:08:16 +01:00
|
|
|
/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
|
2008-06-07 10:07:13 +02:00
|
|
|
/sbin/udevadm settle
|