1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-19 09:15:30 +03:00
aports/testing/mdevd/mdevd.initd
2021-01-10 17:28:14 -03:00

38 lines
836 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 -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 $?
}