[PATCH v2 12/12] Add missing virtlogd.init for OpenRC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ryan Moeller <ryan@xxxxxxxxxxxxx>

Signed-off-by: Ryan Moeller <ryan@xxxxxxxxxxxxx>
---
 src/logging/Makefile.inc.am  | 10 ++++++++++
 src/logging/virtlogd.init.in | 14 ++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 src/logging/virtlogd.init.in

diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am
index 0f7ffa73b3..8e6ea08f36 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
@@ -128,6 +135,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.23.0


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux