diff options
Diffstat (limited to 'system/mdevd/mdevd.initd')
-rw-r--r-- | system/mdevd/mdevd.initd | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/system/mdevd/mdevd.initd b/system/mdevd/mdevd.initd new file mode 100644 index 000000000..3f6bccf86 --- /dev/null +++ b/system/mdevd/mdevd.initd @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 2019 Adélie Linux + +description="mdevd manages device permissions and symbolic links in /dev" +extra_started_commands="reload" +description_reload="Reload the mdevd configuration file" + +depend() +{ + use modloop + need sysfs dev-mount + before checkfs fsck + keyword -lxc -systemd-nspawn -vserver + provide dev +} + +stop() +{ + ebegin "Stopping mdevd" + touch /run/service/mdevd/down + s6-svc -d /run/service/mdevd + eend $? +} + +start() +{ + ebegin "Starting mdevd" + rm -f /run/service/mdevd/down + s6-svc -uwU /run/service/mdevd + eend $? + ebegin "Coldplugging devices" + mdevd-coldplug + eend $? +} + +reload() +{ + ebegin "Reloading mdevd config file" + s6-svc -h /run/service/mdevd + eend $? +} |