1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-20 09:45:12 +03:00
aports/testing/mdevd/mdevd.initd

38 lines
840 B
Text

#!/sbin/openrc-run
extra_started_commands="reload"
description="A netlink-listening device manager similar to mdev"
description_reload="Reload the configuration file"
: ${cfgfile:="/etc/mdev.conf"}
: ${logfile:="/var/log/$RC_SVCNAME.log"}
pidfile="/run/$RC_SVCNAME.pid"
required_files="$cfgfile"
command="/bin/mdevd"
command_args="-C -O4 -f $cfgfile ${command_args:-}"
command_background="yes"
start_stop_daemon_args="--stdout $logfile --stderr $logfile"
supervise_daemon_args="$start_stop_daemon_args"
depend() {
provide dev
need sysfs dev-mount
before checkfs fsck
keyword -containers -lxc -vserver
}
start_pre() {
mkdir -p /dev
}
reload() {
ebegin "Reloading $name configuration"
if [ "$supervisor" ]; then
$supervisor "$RC_SVCNAME" --signal HUP
else
start-stop-daemon --signal HUP --pidfile "$pidfile"
fi
eend $?
}