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