| 1 | #!/sbin/openrc-run |
| 2 | # Copyright 2022 Laurent Bercot for Alpine Linux |
| 3 | # Distributed under the terms of the ISC License. |
| 4 | |
| 5 | description="a netlink-listening device manager similar to mdev" |
| 6 | extra_started_commands="reload" |
| 7 | description_reload="Reload mdevd's configuration file" |
| 8 | command="/usr/bin/mdevd" |
| 9 | command_args="-O4" # send handled events to nlgrp 4 for libudev-zero |
| 10 | command_background="yes" |
| 11 | pidfile="/run/mdevd.pid" |
| 12 | |
| 13 | depend() { |
| 14 | provide dev |
| 15 | need sysfs dev-mount |
| 16 | before checkfs fsck |
| 17 | keyword -containers -lxc -vserver |
| 18 | } |
| 19 | |
| 20 | reload() { |
| 21 | kill -1 `cat "$pidfile"` |
| 22 | } |