CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
procps: updated to 3.3.3 and aligned with upstream. Cleaned cross patches.
[crossrootfs.git] / udev / start_udev
CommitLineData
6dca1d21
JB
1#!/bin/sh
2
1dda3c1b
VM
3# - if /dev is not mounted - mount as a devtmpfs (CONFIG_DEVTMPFS=y) or tmpfs
4# - if /dev is mounted (e.g. due to handover from initramfs or
5# CONFIG_DEVTMPFS_MOUNT=y), remount with specific options
6# - some video drivers require exec access in /dev, thus it's set here
7# - for completness, we add few sanity limits (2k non-empty files, 16k inodes)
6dca1d21 8
1dda3c1b
VM
9UDEVOPTS="exec,nosuid,noatime,mode=0755,nr_blocks=2048,nr_inodes=16384"
10if /bin/mountpoint -q /dev ; then
11 /bin/mount -n -o remount,${UDEVOPTS} dev /dev
12else
13 if /bin/sed -n '/devtmpfs/q1' /proc/filesystems ; then
14 UDEVFS=tmpfs
15 else
16 UDEVFS=devtmpfs
17 fi
18 /bin/mount -n -t $UDEVFS -o ${UDEVOPTS} dev /dev
19fi
20
21# make sure hotplugger is not set
6dca1d21
JB
22echo > /proc/sys/kernel/hotplug
23
1dda3c1b
VM
24# since v155, udevd automatically copies /lib/udev/devices
25# and creates /proc/{kcore,self/fd/{0,1,2}} symlinks
6dca1d21 26
1dda3c1b
VM
27# launch udev daemon, make sure it's not running first
28test -z "$(/bin/pidof -s udevd)" && /sbin/udevd --daemon
6dca1d21
JB
29
30# coldplug devices and wait for the queue to be processed
1dda3c1b
VM
31/sbin/udevadm trigger --type=subsystems --action=add
32/sbin/udevadm trigger --type=devices --action=add
33/sbin/udevadm settle
34
35# retry any failures
36/sbin/udevadm trigger --type=failed --action=add
6dca1d21 37/sbin/udevadm settle