Signed-off-by: Ryan Moeller <ryan@xxxxxxxxxxxxx> --- src/locking/Makefile.inc.am | 7 +++++++ src/locking/virtlockd.init.in | 14 ++++++++++++++ src/logging/Makefile.inc.am | 10 ++++++++++ src/logging/virtlogd.init.in | 14 ++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 src/locking/virtlockd.init.in create mode 100644 src/logging/virtlogd.init.in diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am index e663d7146b..243e3ae767 100644 --- a/src/locking/Makefile.inc.am +++ b/src/locking/Makefile.inc.am @@ -79,6 +79,13 @@ VIRTLOCKD_UNIT_FILES_IN = \ SYSTEMD_UNIT_FILES += $(notdir $(VIRTLOCKD_UNIT_FILES_IN:%.in=%)) SYSTEMD_UNIT_FILES_IN += $(VIRTLOCKD_UNIT_FILES_IN) +OPENRC_INIT_FILES += \ + virtlockd.init \ + $(NULL) +OPENRC_INIT_FILES_IN += \ + virtlockd.init.in \ + $(NULL) + noinst_LTLIBRARIES += libvirt_driver_lock.la libvirt_la_BUILT_LIBADD += libvirt_driver_lock.la diff --git a/src/locking/virtlockd.init.in b/src/locking/virtlockd.init.in new file mode 100644 index 0000000000..45eaed7971 --- /dev/null +++ b/src/locking/virtlockd.init.in @@ -0,0 +1,14 @@ +#!/sbin/openrc-run + +name=virtlogd + +command=@sbindir@/virtlockd +pidfile="@runstatedir@/virtlockd.pid" +command_args="--daemon --pid-file=${pidfile}" +PATH="${PATH}:@sbindir@:@bindir@" +supervisor=supervise-daemon + +depend() { + provide virtlockd + keyword -shutdown +} diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am index c4fa49106e..083d8773cb 100644 --- a/src/logging/Makefile.inc.am +++ b/src/logging/Makefile.inc.am @@ -55,6 +55,13 @@ VIRTLOGD_UNIT_FILES_IN = \ SYSTEMD_UNIT_FILES += $(notdir $(VIRTLOGD_UNIT_FILES_IN:%.in=%)) SYSTEMD_UNIT_FILES_IN += $(VIRTLOGD_UNIT_FILES_IN) +OPENRC_INIT_FILES += \ + virtlogd.init \ + $(NULL) +OPENRC_INIT_FILES_IN += \ + virtlogd.init.in \ + $(NULL) + noinst_LTLIBRARIES += libvirt_driver_log.la libvirt_la_BUILT_LIBADD += libvirt_driver_log.la @@ -126,6 +133,9 @@ logging/log_daemon_dispatch_stubs.h: $(LOG_PROTOCOL) \ virLogManagerProtocol VIR_LOG_MANAGER_PROTOCOL \ $(LOG_PROTOCOL) > logging/log_daemon_dispatch_stubs.h +virtlogd.init: logging/virtlogd.init.in $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@ + virtlogd.service: logging/virtlogd.service.in $(top_builddir)/config.status $(AM_V_GEN)sed $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@ diff --git a/src/logging/virtlogd.init.in b/src/logging/virtlogd.init.in new file mode 100644 index 0000000000..61e41f7689 --- /dev/null +++ b/src/logging/virtlogd.init.in @@ -0,0 +1,14 @@ +#!/sbin/openrc-run + +name=virtlogd + +command=@sbindir@/virtlogd +pidfile="@runstatedir@/virtlogd.pid" +command_args="--daemon --pid-file=${pidfile}" +PATH="${PATH}:@sbindir@:@bindir@" +supervisor=supervise-daemon + +depend() { + provide virtlogd + keyword -shutdown +} -- 2.24.1