CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
pkg-config: updated to 0.29.2
[crossrootfs.git] / eudev / start_udev
CommitLineData
dda3fa49
VM
1#!/bin/sh
2
3# - if /dev is not mounted - mount as a devtmpfs (CONFIG_DEVTMPFS=y)
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)
8
9UDEVOPTS="exec,nosuid,noatime,mode=0755,nr_blocks=2048,nr_inodes=16384"
10if /bin/mountpoint -q /dev ; then
2bf78e1f 11 /bin/mount -n -o remount,${UDEVOPTS} dev /dev
dda3fa49 12else
2bf78e1f 13 /bin/mount -n -t devtmpfs -o ${UDEVOPTS} dev /dev
dda3fa49
VM
14fi
15
16# mount /run directory
17/bin/mount -n -t tmpfs -o mode=0755,nosuid,nodev,exec tmpfs /run
18
dda3fa49
VM
19# copy devcies from /lib/udev/devices
20cp -ar /lib/udev/devices/* /dev
21
22# launch udev daemon, make sure it's not running first
23test -z "$(/bin/pidof -s udevd)" && /sbin/udevd --daemon
24
25# coldplug devices and wait for the queue to be processed
26/sbin/udevadm trigger --type=subsystems --action=add
27/sbin/udevadm trigger --type=devices --action=add
28/sbin/udevadm settle
2bf78e1f 29