void-packages/srcpkgs/udev/files/udev.rc

33 lines
464 B
Plaintext
Raw Normal View History

#!/sbin/runscript
#
# OpenRC service for udev(7).
command=/sbin/udevd
command_args="--daemon"
name="udev daemon"
depend()
{
provide dev
need sysfs
before checkfs fsck
keyword novserver
}
start()
{
[ ! -d /run/udev ] && mkdir -p /run/udev
ebegin "Starting udev and waiting for uevents"
${command} ${command_args} && \
udevadm trigger --action=add && udevadm settle
eend $?
}
stop()
{
ebegin "Stopping udev daemon"
udevadm control --exit
eend $?
}