Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/Makefile.am | 57 ---------------------------------
src/interface/Makefile.inc.am | 10 ------
src/interface/meson.build | 5 +++
src/libxl/Makefile.inc.am | 10 ------
src/libxl/meson.build | 5 +++
src/locking/Makefile.inc.am | 11 -------
src/locking/meson.build | 5 +++
src/logging/Makefile.inc.am | 10 ------
src/logging/meson.build | 5 +++
src/lxc/Makefile.inc.am | 10 ------
src/lxc/meson.build | 5 +++
src/meson.build | 41 ++++++++++++++++++++++++
src/network/Makefile.inc.am | 10 ------
src/network/meson.build | 5 +++
src/node_device/Makefile.inc.am | 11 -------
src/node_device/meson.build | 5 +++
src/nwfilter/Makefile.inc.am | 10 ------
src/nwfilter/meson.build | 5 +++
src/qemu/Makefile.inc.am | 10 ------
src/qemu/meson.build | 5 +++
src/remote/Makefile.inc.am | 30 -----------------
src/remote/meson.build | 12 +++++++
src/secret/Makefile.inc.am | 11 -------
src/secret/meson.build | 5 +++
src/storage/Makefile.inc.am | 11 -------
src/storage/meson.build | 5 +++
src/vbox/Makefile.inc.am | 11 -------
src/vbox/meson.build | 5 +++
src/vz/Makefile.inc.am | 11 -------
src/vz/meson.build | 5 +++
30 files changed, 118 insertions(+), 223 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index bd27e5acc29..0b40c23f980 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,17 +34,8 @@ tapset_DATA =
endif WITH_DTRACE_PROBES
RPC_PROBE_FILES =
LOGROTATE_FILES_IN =
-OPENRC_INIT_FILES =
-OPENRC_INIT_FILES_IN =
-OPENRC_CONF_FILES =
SYSCONF_FILES =
-COMMON_UNIT_VARS = \
- -e 's|[@]runstatedir[@]|$(runstatedir)|g' \
- -e 's|[@]sbindir[@]|$(sbindir)|g' \
- -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
- $(NULL)
-
include security/Makefile.inc.am
include access/Makefile.inc.am
include logging/Makefile.inc.am
@@ -226,25 +217,6 @@ uninstall-sysconfig:
done
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
-OPENRC_CONF_DIR = $(sysconfdir)/conf.d
-
-install-openrc-conf:
- $(MKDIR_P) $(DESTDIR)$(OPENRC_CONF_DIR)
- for f in $(OPENRC_CONF_FILES:%.confd=%) ; \
- do \
- tgt=`basename $$f`; \
- $(INSTALL_DATA) $(srcdir)/$$f.confd \
- $(DESTDIR)$(OPENRC_CONF_DIR)/$$tgt; \
- done
-
-uninstall-openrc-conf:
- for f in $(OPENRC_CONF_FILES:%.confd=%) ; \
- do \
- tgt=`basename $$f`; \
- rm -f $(DESTDIR)$(OPENRC_CONF_DIR)/$$tgt; \
- done
- rmdir $(DESTDIR)$(OPENRC_CONF_DIR) || :
-
LOGROTATE_FILES := $(LOGROTATE_FILES_IN:remote/%.in=%)
%.logrotate: remote/%.logrotate.in
@@ -272,35 +244,6 @@ UNINSTALL_LOCAL += uninstall-logrotate
endif WITH_LIBVIRTD
-if WITH_LIBVIRTD
-if LIBVIRT_INIT_SCRIPT_OPENRC
-
-OPENRC_INIT_DIR = $(sysconfdir)/init.d
-
-install-openrc: $(OPENRC_INIT_FILES) install-openrc-conf
- $(MKDIR_P) $(DESTDIR)$(OPENRC_INIT_DIR)
- for f in $(OPENRC_INIT_FILES:%.init=%) ; \
- do \
- tgt=`basename $$f`; \
- $(INSTALL_SCRIPT) $$f.init \
- $(DESTDIR)$(OPENRC_INIT_DIR)/$$tgt ; \
- done
-
-uninstall-openrc: uninstall-openrc-conf
- for f in $(OPENRC_INIT_FILES:%.init=%) ; \
- do \
- tgt=`basename $$f`; \
- rm -f $(DESTDIR)$(OPENRC_INIT_DIR)/$$tgt ; \
- done
- rmdir $(DESTDIR)$(OPENRC_INIT_DIR) || :
-
-INSTALL_DATA_LOCAL += install-openrc
-UNINSTALL_LOCAL += uninstall-openrc
-endif LIBVIRT_INIT_SCRIPT_OPENRC
-
-endif WITH_LIBVIRTD
-
-
install-data-local: $(INSTALL_DATA_LOCAL) \
$(INSTALL_DATA_DIRS:%=install-data-%)
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am
index b4bcfb7ecaa..f6626c7f491 100644
--- a/src/interface/Makefile.inc.am
+++ b/src/interface/Makefile.inc.am
@@ -8,14 +8,4 @@ if WITH_INTERFACE
SYSCONF_FILES += interface/virtinterfaced.sysconf
-OPENRC_INIT_FILES += \
- virtinterfaced.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- interface/virtinterfaced.init.in \
- $(NULL)
-
-virtinterfaced.init: interface/virtinterfaced.init.in \
- $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
endif WITH_INTERFACE
diff --git a/src/interface/meson.build b/src/interface/meson.build
index a94b1164aa1..a6b3e888358 100644
--- a/src/interface/meson.build
+++ b/src/interface/meson.build
@@ -48,4 +48,9 @@ if conf.has('WITH_INTERFACE')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtinterfaced',
+ 'in_file': files('virtinterfaced.init.in')
+ }
endif
diff --git a/src/libxl/Makefile.inc.am b/src/libxl/Makefile.inc.am
index b29ae98269c..9a33eb5f06b 100644
--- a/src/libxl/Makefile.inc.am
+++ b/src/libxl/Makefile.inc.am
@@ -7,16 +7,6 @@ if WITH_LIBXL
SYSCONF_FILES += libxl/virtxend.sysconf
-OPENRC_INIT_FILES += \
- virtxend.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- libxl/virtxend.init.in \
- $(NULL)
-
-virtxend.init: libxl/virtxend.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
INSTALL_DATA_DIRS += libxl
install-data-libxl:
diff --git a/src/libxl/meson.build b/src/libxl/meson.build
index 4a872198702..5f858dc32fc 100644
--- a/src/libxl/meson.build
+++ b/src/libxl/meson.build
@@ -67,4 +67,9 @@ if conf.has('WITH_LIBXL')
'deps': 'ConditionPathExists=/proc/xen/capabilities',
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtxend',
+ 'in_file': files('virtxend.init.in'),
+ }
endif
diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am
index 8727efdc9a5..8a0ecd8d1f2 100644
--- a/src/locking/Makefile.inc.am
+++ b/src/locking/Makefile.inc.am
@@ -3,13 +3,6 @@
RPC_PROBE_FILES += $(srcdir)/locking/lock_protocol.x
SYSCONF_FILES += locking/virtlockd.sysconf
-OPENRC_INIT_FILES += \
- virtlockd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- locking/virtlockd.init.in \
- $(NULL)
-
INSTALL_DATA_DIRS += locking
install-data-locking:
@@ -33,7 +26,3 @@ endif WITH_LIBVIRTD
install-data-locking \
uninstall-data-locking \
$(NULL)
-
-
-virtlockd.init: locking/virtlockd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@
diff --git a/src/locking/meson.build b/src/locking/meson.build
index d35853e799b..f560c9b44b9 100644
--- a/src/locking/meson.build
+++ b/src/locking/meson.build
@@ -144,6 +144,11 @@ if conf.has('WITH_LIBVIRTD')
'socket_admin_in': files('virtlockd-admin.socket.in'),
}
+ openrc_init_files += {
+ 'name': 'virtlockd',
+ 'in_file': files('virtlockd.init.in'),
+ }
+
if conf.has('WITH_SANLOCK')
virt_helpers += {
'name': 'libvirt_sanlock_helper',
diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am
index ad07c7b7f77..48cae3add15 100644
--- a/src/logging/Makefile.inc.am
+++ b/src/logging/Makefile.inc.am
@@ -1,13 +1,3 @@
# vim: filetype=automake
SYSCONF_FILES += logging/virtlogd.sysconf
-
-OPENRC_INIT_FILES += \
- virtlogd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- logging/virtlogd.init.in \
- $(NULL)
-
-virtlogd.init: logging/virtlogd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@
diff --git a/src/logging/meson.build b/src/logging/meson.build
index 9cfd60019ea..40327241e3c 100644
--- a/src/logging/meson.build
+++ b/src/logging/meson.build
@@ -87,4 +87,9 @@ if conf.has('WITH_LIBVIRTD')
'socket_in': files('virtlogd.socket.in'),
'socket_admin_in': files('virtlogd-admin.socket.in'),
}
+
+ openrc_init_files += {
+ 'name': 'virtlogd',
+ 'in_file': files('virtlogd.init.in'),
+ }
endif
diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am
index 1b3d0a2b4a8..3cf6f96ea1d 100644
--- a/src/lxc/Makefile.inc.am
+++ b/src/lxc/Makefile.inc.am
@@ -13,16 +13,6 @@ if WITH_LXC
SYSCONF_FILES += lxc/virtlxcd.sysconf
-OPENRC_INIT_FILES += \
- virtlxcd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- lxc/virtlxcd.init.in \
- $(NULL)
-
-virtlxcd.init: lxc/virtlxcd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
if WITH_DTRACE_PROBES
RPC_PROBE_FILES += $(srcdir)/lxc/lxc_monitor_protocol.x
endif
diff --git a/src/lxc/meson.build b/src/lxc/meson.build
index c539149a8c9..6135f61d4ab 100644
--- a/src/lxc/meson.build
+++ b/src/lxc/meson.build
@@ -150,4 +150,9 @@ if conf.has('WITH_LXC')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtlxcd',
+ 'in_file': files('virtlxcd.init.in'),
+ }
endif
diff --git a/src/meson.build b/src/meson.build
index b22c950c6d4..602e8176d99 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -191,6 +191,12 @@ guest_unit_files = []
# * conflicts - if the service conflicts with libvirtd (optional, true)
virt_daemon_units = []
+# openrc_init_files
+# generate libvirt daemon openrc init files
+# * name - daemon name (required)
+# * in_file - source init file (required)
+openrc_init_files = []
+
# list subdirectories
@@ -718,4 +724,39 @@ if conf.has('WITH_LIBVIRTD')
endforeach
endforeach
endif
+
+ # Generate openrc init files
+ if init_script == 'openrc'
+ foreach init : openrc_init_files
+ init_conf = configuration_data()
+ init_conf.set('sbindir', sbindir)
+ init_conf.set('runstatedir', runstatedir)
+ if conf.has('WITH_FIREWALLD')
+ need_firewalld = 'need firewalld'
+ else
+ need_firewalld = ''
+ endif
+ init_conf.set('NEED_FIREWALLD', need_firewalld)
+
+ init_file = configure_file(
+ input: init['in_file'],
+ output: '@0@.init'.format(init['name']),
+ configuration: init_conf,
+ )
+
+ install_data(
+ init_file,
+ install_dir: sysconfdir / 'init.d',
+ rename: [ init['name'] ],
+ )
+
+ if init.has_key('confd')
+ install_data(
+ init['confd'],
+ install_dir: sysconfdir / 'conf.d',
+ rename: [ init['name'] ],
+ )
+ endif
+ endforeach
+ endif
endif
diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am
index b84057eeb72..81971c64ed4 100644
--- a/src/network/Makefile.inc.am
+++ b/src/network/Makefile.inc.am
@@ -7,16 +7,6 @@ STATEFUL_DRIVER_SOURCE_FILES += \
if WITH_NETWORK
SYSCONF_FILES += network/virtnetworkd.sysconf
-OPENRC_INIT_FILES += \
- virtnetworkd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- network/virtnetworkd.init.in \
- $(NULL)
-
-virtnetworkd.init: network/virtnetworkd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
INSTALL_DATA_DIRS += network
UUID=$(shell uuidgen 2>/dev/null)
diff --git a/src/network/meson.build b/src/network/meson.build
index 0c643900c15..c27578d66b4 100644
--- a/src/network/meson.build
+++ b/src/network/meson.build
@@ -67,4 +67,9 @@ if conf.has('WITH_NETWORK')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtnetworkd',
+ 'in_file': files('virtnetworkd.init.in'),
+ }
endif
diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc.am
index beff0d6ed04..e6fcbf6c9e5 100644
--- a/src/node_device/Makefile.inc.am
+++ b/src/node_device/Makefile.inc.am
@@ -13,15 +13,4 @@ STATEFUL_DRIVER_SOURCE_FILES += \
if WITH_NODE_DEVICES
SYSCONF_FILES += node_device/virtnodedevd.sysconf
-
-OPENRC_INIT_FILES += \
- virtnodedevd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- node_device/virtnodedevd.init.in \
- $(NULL)
-
-virtnodedevd.init: node_device/virtnodedevd.init.in \
- $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
endif WITH_NODE_DEVICES
diff --git a/src/node_device/meson.build b/src/node_device/meson.build
index 875e4ec775f..d73867148ea 100644
--- a/src/node_device/meson.build
+++ b/src/node_device/meson.build
@@ -60,4 +60,9 @@ if conf.has('WITH_NODE_DEVICES')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtnodedevd',
+ 'in_file': files('virtnodedevd.init.in'),
+ }
endif
diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am
index 2384f053aeb..8fcd63cbbf9 100644
--- a/src/nwfilter/Makefile.inc.am
+++ b/src/nwfilter/Makefile.inc.am
@@ -13,14 +13,4 @@ nwfilterxml_DATA = $(NWFILTER_XML_FILES)
SYSCONF_FILES += nwfilter/virtnwfilterd.sysconf
-OPENRC_INIT_FILES += \
- virtnwfilterd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- nwfilter/virtnwfilterd.init.in \
- $(NULL)
-
-virtnwfilterd.init: nwfilter/virtnwfilterd.init.in \
- $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
endif WITH_NWFILTER
diff --git a/src/nwfilter/meson.build b/src/nwfilter/meson.build
index 50ee78933e2..744600a73d1 100644
--- a/src/nwfilter/meson.build
+++ b/src/nwfilter/meson.build
@@ -55,4 +55,9 @@ if conf.has('WITH_NWFILTER')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtnwfilterd',
+ 'in_file': files('virtnwfilterd.init.in'),
+ }
endif
diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am
index 0ea8905ed57..ec3178c373a 100644
--- a/src/qemu/Makefile.inc.am
+++ b/src/qemu/Makefile.inc.am
@@ -6,16 +6,6 @@ STATEFUL_DRIVER_SOURCE_FILES += $(addprefix
$(srcdir)/,$(QEMU_DRIVER_SOURCES))
if WITH_QEMU
SYSCONF_FILES += qemu/virtqemud.sysconf
-OPENRC_INIT_FILES += \
- virtqemud.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- qemu/virtqemud.init.in \
- $(NULL)
-
-virtqemud.init: qemu/virtqemud.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
INSTALL_DATA_DIRS += qemu
install-data-qemu:
diff --git a/src/qemu/meson.build b/src/qemu/meson.build
index 479c530ece8..09b72335741 100644
--- a/src/qemu/meson.build
+++ b/src/qemu/meson.build
@@ -147,4 +147,9 @@ if conf.has('WITH_QEMU')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtqemud',
+ 'in_file': files('virtqemud.init.in'),
+ }
endif
diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am
index 159bc5e01be..73f7578ee5e 100644
--- a/src/remote/Makefile.inc.am
+++ b/src/remote/Makefile.inc.am
@@ -12,19 +12,6 @@ SYSCONF_FILES += \
remote/virtproxyd.sysconf \
$(NULL)
-OPENRC_INIT_FILES += \
- libvirtd.init \
- virtproxyd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- remote/libvirtd.init.in \
- remote/virtproxyd.init.in \
- $(NULL)
-OPENRC_CONF_FILES += \
- remote/libvirtd.confd \
- remote/virtproxyd.confd \
- $(NULL)
-
if WITH_LIBVIRTD
INSTALL_DATA_DIRS += remote
@@ -100,20 +87,3 @@ uninstall-sasl:
INSTALL_DATA_LOCAL += install-sasl
UNINSTALL_LOCAL += uninstall-sasl
endif WITH_SASL
-
-LIBVIRTD_INIT_VARS = \
- $(COMMON_UNIT_VARS)
-
-if WITH_FIREWALLD
-LIBVIRTD_INIT_VARS += \
- -e 's|[@]NEED_FIREWALLD[@]|need firewalld|g'
-else ! WITH_FIREWALLD
-LIBVIRTD_INIT_VARS += \
- -e 's|[@]NEED_FIREWALLD[@]||g'
-endif ! WITH_FIREWALLD
-
-libvirtd.init: remote/libvirtd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
-virtproxyd.init: remote/virtproxyd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
diff --git a/src/remote/meson.build b/src/remote/meson.build
index c0bc6f14b93..0310ad232aa 100644
--- a/src/remote/meson.build
+++ b/src/remote/meson.build
@@ -146,6 +146,12 @@ if conf.has('WITH_REMOTE')
'sockets': [ 'main', 'ro', 'admin', 'tcp',
'tls' ],
}
+ openrc_init_files += {
+ 'name': 'libvirtd',
+ 'in_file': files('libvirtd.init.in'),
+ 'confd': files('libvirtd.confd'),
+ }
+
virt_daemons += {
'name': 'virtproxyd',
'c_args': [
@@ -170,6 +176,12 @@ if conf.has('WITH_REMOTE')
'sockets': [ 'main', 'ro', 'admin', 'tcp',
'tls' ],
'deps': libvirtd_socket_conflicts,
}
+
+ openrc_init_files += {
+ 'name': 'virtproxyd',
+ 'in_file': files('virtproxyd.init.in'),
+ 'confd': files('virtproxyd.confd'),
+ }
endif
endif
diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am
index 3aafe7a6a5d..dd38e6888cd 100644
--- a/src/secret/Makefile.inc.am
+++ b/src/secret/Makefile.inc.am
@@ -6,15 +6,4 @@ STATEFUL_DRIVER_SOURCE_FILES += \
if WITH_SECRETS
SYSCONF_FILES += secret/virtsecretd.sysconf
-
-OPENRC_INIT_FILES += \
- virtsecretd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- secret/virtsecretd.init.in \
- $(NULL)
-
-virtsecretd.init: secret/virtsecretd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
endif WITH_SECRETS
diff --git a/src/secret/meson.build b/src/secret/meson.build
index a6b919dfabb..3b3f999f758 100644
--- a/src/secret/meson.build
+++ b/src/secret/meson.build
@@ -37,4 +37,9 @@ if conf.has('WITH_SECRETS')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtsecretd',
+ 'in_file': files('virtsecretd.init.in'),
+ }
endif
diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am
index 3b4a13032aa..23576659785 100644
--- a/src/storage/Makefile.inc.am
+++ b/src/storage/Makefile.inc.am
@@ -6,15 +6,4 @@ STATEFUL_DRIVER_SOURCE_FILES += \
if WITH_STORAGE
SYSCONF_FILES += storage/virtstoraged.sysconf
-
-OPENRC_INIT_FILES += \
- virtstoraged.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- storage/virtstoraged.init.in \
- $(NULL)
-
-virtstoraged.init: storage/virtstoraged.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
endif WITH_STORAGE
diff --git a/src/storage/meson.build b/src/storage/meson.build
index acc9600ba4b..7a1ed9f4b81 100644
--- a/src/storage/meson.build
+++ b/src/storage/meson.build
@@ -135,6 +135,11 @@ if conf.has('WITH_STORAGE')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtstoraged',
+ 'in_file': files('virtstoraged.init.in'),
+ }
endif
if conf.has('WITH_STORAGE_DISK')
diff --git a/src/vbox/Makefile.inc.am b/src/vbox/Makefile.inc.am
index 4968777858c..28bc3c4a585 100644
--- a/src/vbox/Makefile.inc.am
+++ b/src/vbox/Makefile.inc.am
@@ -7,15 +7,4 @@ DRIVER_SOURCE_FILES += \
if WITH_VBOX
SYSCONF_FILES += vbox/virtvboxd.sysconf
-
-OPENRC_INIT_FILES += \
- virtvboxd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- vbox/virtvboxd.init.in \
- $(NULL)
-
-virtvboxd.init: vbox/virtvboxd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
endif WITH_VBOX
diff --git a/src/vbox/meson.build b/src/vbox/meson.build
index 1fb88513ba0..f1b8012777f 100644
--- a/src/vbox/meson.build
+++ b/src/vbox/meson.build
@@ -60,4 +60,9 @@ if conf.has('WITH_VBOX')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtvboxd',
+ 'in_file': files('virtvboxd.init.in'),
+ }
endif
diff --git a/src/vz/Makefile.inc.am b/src/vz/Makefile.inc.am
index 5889d0170a4..7e7d402a7f0 100644
--- a/src/vz/Makefile.inc.am
+++ b/src/vz/Makefile.inc.am
@@ -6,15 +6,4 @@ STATEFUL_DRIVER_SOURCE_FILES += $(addprefix
$(srcdir)/,$(VZ_DRIVER_SOURCES))
if WITH_VZ
SYSCONF_FILES += vz/virtvzd.sysconf
-
-OPENRC_INIT_FILES += \
- virtvzd.init \
- $(NULL)
-OPENRC_INIT_FILES_IN += \
- vz/virtvzd.init.in \
- $(NULL)
-
-virtvzd.init: vz/virtvzd.init.in $(top_builddir)/config.status
- $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@
-
endif WITH_VZ
diff --git a/src/vz/meson.build b/src/vz/meson.build
index dcf8f5037fd..fde1e937f35 100644
--- a/src/vz/meson.build
+++ b/src/vz/meson.build
@@ -52,4 +52,9 @@ if conf.has('WITH_VZ')
'sockets': [ 'main', 'ro', 'admin' ],
'conflicts': true,
}
+
+ openrc_init_files += {
+ 'name': 'virtvzd',
+ 'in_file': files('virtvzd.init.in'),
+ }
endif
--
2.26.2