#!/sbin/openrc-run # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 command=/sbin/dmeventd extra_started_commands=reload depend() { # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that # means dmeventd is NOT notified, as it cannot be safely running after lvm device-mapper } _load() { /usr/bin/killall -0 /sbin/dmeventd &>/dev/null \ && { DMEVENTD_IDLE_EXIT_TIMEOUT=${DMEVENTD_IDLE_EXIT_TIMEOUT:--1} \ ${command} -R & } || { DMEVENTD_IDLE_EXIT_TIMEOUT=${DMEVENTD_IDLE_EXIT_TIMEOUT:--1} \ ${command} & } } reload() { ebegin "Restarting dmeventd" _load eend $? } start() { ebegin "Starting dmeventd" _load eend $? } stop() { ebegin "Stopping dmeventd" start-stop-daemon --stop -x ${command} eend $? }