diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-05 17:45:38 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-04-05 17:46:21 +0200 |
commit | 24cff32974dee2579d7e785d450ed180a4ef0171 (patch) | |
tree | 748a194adf798df8e652ade959546ceb098b2aab /testing/mdevd/mdevd.initd | |
parent | 5333ec4645d3267e2a9169d5b16a562055e23987 (diff) | |
download | aports-24cff32974dee2579d7e785d450ed180a4ef0171.tar.bz2 aports-24cff32974dee2579d7e785d450ed180a4ef0171.tar.xz |
testing/mdevd: add runscript
Diffstat (limited to 'testing/mdevd/mdevd.initd')
-rw-r--r-- | testing/mdevd/mdevd.initd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/mdevd/mdevd.initd b/testing/mdevd/mdevd.initd new file mode 100644 index 0000000000..a9feeea154 --- /dev/null +++ b/testing/mdevd/mdevd.initd @@ -0,0 +1,33 @@ +#!/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="-f $cfgfile ${command_args:-}" +command_background="yes" +start_stop_daemon_args="--stdout $logfile --stderr $logfile" + +depend() { + provide dev + need sysfs dev-mount + before checkfs fsck + keyword -containers -lxc -vserver +} + +start_pre() { + mkdir -p /dev +} + +reload() { + ebegin "Reloading $name configuration" + start-stop-daemon --signal HUP --pidfile "$pidfile" + eend $? +} |