Viitor_upstart/etc/init/udev.conf

51 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

description "Staring udevdaemon to create all the /dev entrys"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on startudev
stop on runlevel [06]
console output
pre-start script
source /etc/init/functions
echo "Starting udev"
mount -t sysfs none /sys &&
status_message "udev: mount sysfs"
if [ ! -d /var/lock/subsys ]; then
mkdir /var/lock/subsys
fi
if [ ! -d /dev ]; then
mkdir /dev
fi
if [ ! -c /dev/zero ]; then
mount -n -t tmpfs -o mode=0755 udev /dev &&
status_message "udev: tmpfs on /dev created"
fi
test -d /lib/udev/devices &&
cp --preserve=all --recursive --remove-destination /lib/udev/devices/* /dev &&
status_message "udev: Static entries copied..."
/bin/mkdir -p /dev/shm
/bin/mkdir -p /dev/pts
/bin/mount -n -t tmpfs -o mode=1755 none /dev/shm
test -c /dev/null ||
/bin/mknod /dev/null c 1 3 &&
/bin/chmod 666 /dev/null
test -c /dev/console ||
/bin/mknod /dev/console c 5 1
status_message "udev prestart ready"
end script
respawn
exec /sbin/udevd
post-start script
source /etc/init/functions
/bin/mkdir -p /dev/.udev/queue
status_message "udev: queue maked"
/sbin/udevadm trigger
status_message "udev: trigger done"
/sbin/udevadm settle
status_message "udev: Coldplug ready..."
end script