2009-05-04 21:44:24 +02:00
|
|
|
#!/sbin/runscript
|
|
|
|
#
|
|
|
|
# OpenRC service for udev(7).
|
|
|
|
|
|
|
|
command=/sbin/udevd
|
|
|
|
command_args="--daemon"
|
2011-04-29 20:26:58 +02:00
|
|
|
name="udev daemon"
|
2009-05-04 21:44:24 +02:00
|
|
|
|
|
|
|
depend()
|
|
|
|
{
|
|
|
|
provide dev
|
|
|
|
need sysfs
|
|
|
|
before checkfs fsck
|
|
|
|
keyword novserver
|
|
|
|
}
|
|
|
|
|
|
|
|
start()
|
|
|
|
{
|
2011-04-29 20:26:58 +02:00
|
|
|
[ ! -d /run/udev ] && mkdir -p /run/udev
|
|
|
|
|
|
|
|
ebegin "Starting udev and waiting for uevents"
|
2009-05-04 21:44:24 +02:00
|
|
|
${command} ${command_args} && \
|
2010-06-03 21:44:20 +02:00
|
|
|
udevadm trigger --action=add && udevadm settle
|
2009-05-04 21:44:24 +02:00
|
|
|
eend $?
|
|
|
|
}
|
2011-04-29 20:26:58 +02:00
|
|
|
|
|
|
|
stop()
|
|
|
|
{
|
|
|
|
ebegin "Stopping udev daemon"
|
|
|
|
udevadm control --exit
|
|
|
|
eend $?
|
|
|
|
}
|