From nobody Tue Apr 16 04:25:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574779594; cv=none; d=zohomail.com; s=zohoarc; b=J2SqP1P65jbYcXiwywHaPCnNUztMEgNGOiamyHN3qVL9WUhvSOmGt6mbFjNqK0legu0ZkIJuPI5g/G2xSd68MW4ZGdtKXbjtzl0pWIkdun7FG7pLsOv39vVk+2Vx+yeV/vMM6GfCIV9gJSDQrzMxAHr2cvrGRiq8wNwd2WP7HdA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574779594; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fzwFLXiPYThs/dGY3HM6Jmmm5/5GS92oUTRkPAj9AoI=; b=Xnj46ww+HcByOHd5fImxhkFmtNThwjLbV4AZD828tNcAb0rXdTUp3BRY7mVpkDs5ECEzG+mAtoEmaeOL2JVhe2/r/8jISmzgS0o90ww6m64BdFiMYmEni4Nru/5jibpAkJ9EMjylHOKJz03WH0jHCFvy9ukJjEmX0UVLsZCGKNg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1574779594611184.18075100131102; Tue, 26 Nov 2019 06:46:34 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-17-iPhg9BD6NXyfJpX6lOvxuQ-1; Tue, 26 Nov 2019 09:46:31 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 743B8801FC1; Tue, 26 Nov 2019 14:46:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8F11600CD; Tue, 26 Nov 2019 14:46:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 173874BB78; Tue, 26 Nov 2019 14:46:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAQEkJNQ010474 for ; Tue, 26 Nov 2019 09:46:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id 392CB60CCC; Tue, 26 Nov 2019 14:46:19 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 689BA60C87 for ; Tue, 26 Nov 2019 14:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574779593; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fzwFLXiPYThs/dGY3HM6Jmmm5/5GS92oUTRkPAj9AoI=; b=VJdB934PqCXncXV9XvgSZWpRDHfAy3uI0PB2tod0ttzn22N4hSocy4pynu3PdBuN+3XcDq NhE1GUCkKOjuRpM+iZmE7/xIDH5Hzndc+2jK6HAysvSVTAmE+47eOsT7w0ripPVPvGgror nsgOX7J5C8I4DQnGLPxfnY2HwRNCgIE= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 26 Nov 2019 15:46:11 +0100 Message-Id: <3e09568701a1a3ebaa40a2c422663da13c657fc8.1574779188.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] configure: Provide OpenRC scripts for sub-daemons X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: iPhg9BD6NXyfJpX6lOvxuQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" There is plenty of distributions that haven't switched to systemd nor they force their users to (Gentoo, Alpine Linux to name a few). With the daemon split merged their only option is to still use the monolithic daemon which will go away eventually. Provide init scripts for these distros too. For now, I'm not introducing config files which would correspond to the init files except for libvirtd and virtproxyd init scripts where it might be desirable to tweak the command line of corresponding daemons. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- m4/virt-init-script.m4 | 8 +++- src/Makefile.am | 56 +++++++++++++++++++++++++++- src/interface/Makefile.inc.am | 11 ++++++ src/interface/virtinterfaced.init.in | 26 +++++++++++++ src/libxl/Makefile.inc.am | 10 +++++ src/libxl/virtxend.init.in | 26 +++++++++++++ src/lxc/Makefile.inc.am | 10 +++++ src/lxc/virtlxcd.init.in | 26 +++++++++++++ src/network/Makefile.inc.am | 10 +++++ src/network/virtnetworkd.init.in | 26 +++++++++++++ src/node_device/Makefile.inc.am | 11 ++++++ src/node_device/virtnodedevd.init.in | 26 +++++++++++++ src/nwfilter/Makefile.inc.am | 11 ++++++ src/nwfilter/virtnwfilterd.init.in | 26 +++++++++++++ src/qemu/Makefile.inc.am | 10 +++++ src/qemu/virtqemud.init.in | 26 +++++++++++++ src/remote/Makefile.inc.am | 30 +++++++++++++++ src/remote/libvirtd.confd | 18 +++++++++ src/remote/libvirtd.init.in | 29 ++++++++++++++ src/remote/virtproxyd.confd | 10 +++++ src/remote/virtproxyd.init.in | 28 ++++++++++++++ src/secret/Makefile.inc.am | 10 +++++ src/secret/virtsecretd.init.in | 26 +++++++++++++ src/storage/Makefile.inc.am | 10 +++++ src/storage/virtstoraged.init.in | 26 +++++++++++++ src/vbox/Makefile.inc.am | 10 +++++ src/vbox/virtvboxd.init.in | 26 +++++++++++++ src/vz/Makefile.inc.am | 10 +++++ src/vz/virtvzd.init.in | 26 +++++++++++++ 29 files changed, 576 insertions(+), 2 deletions(-) create mode 100644 src/interface/virtinterfaced.init.in create mode 100644 src/libxl/virtxend.init.in create mode 100644 src/lxc/virtlxcd.init.in create mode 100644 src/network/virtnetworkd.init.in create mode 100644 src/node_device/virtnodedevd.init.in create mode 100644 src/nwfilter/virtnwfilterd.init.in create mode 100644 src/qemu/virtqemud.init.in create mode 100644 src/remote/libvirtd.confd create mode 100644 src/remote/libvirtd.init.in create mode 100644 src/remote/virtproxyd.confd create mode 100644 src/remote/virtproxyd.init.in create mode 100644 src/secret/virtsecretd.init.in create mode 100644 src/storage/virtstoraged.init.in create mode 100644 src/vbox/virtvboxd.init.in create mode 100644 src/vz/virtvzd.init.in diff --git a/m4/virt-init-script.m4 b/m4/virt-init-script.m4 index 6eb81f0429..676135866f 100644 --- a/m4/virt-init-script.m4 +++ b/m4/virt-init-script.m4 @@ -19,7 +19,7 @@ dnl =20 AC_DEFUN([LIBVIRT_ARG_INIT_SCRIPT],[ LIBVIRT_ARG_WITH([INIT_SCRIPT], - [Style of init script to install: systemd, check, non= e], + [Style of init script to install: systemd, openrc, ch= eck, none], [check]) ]) =20 @@ -32,12 +32,16 @@ AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[ if test "$with_init_script" =3D check && type systemctl >/dev/null 2>&= 1; then with_init_script=3Dsystemd fi + if test "$with_init_script" =3D check && type openrc >/dev/null 2>&1; = then + with_init_script=3Dopenrc + fi if test "$with_init_script" =3D check; then with_init_script=3Dnone fi =20 AS_CASE([$with_init_script], [systemd],[], + [openrc],[], [none],[], [*],[ AC_MSG_ERROR([Unknown initscript flavour $with_init_script]) @@ -46,6 +50,8 @@ AC_DEFUN([LIBVIRT_CHECK_INIT_SCRIPT],[ =20 AM_CONDITIONAL([LIBVIRT_INIT_SCRIPT_SYSTEMD], [test "$with_init_script" =3D "systemd"]) + AM_CONDITIONAL([LIBVIRT_INIT_SCRIPT_OPENRC], + [test "$with_init_script" =3D "openrc"]) =20 AC_MSG_RESULT($with_init_script) ]) diff --git a/src/Makefile.am b/src/Makefile.am index 696e64c52e..4b9736d7da 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -88,6 +88,9 @@ PODFILES =3D MANINFILES =3D SYSTEMD_UNIT_FILES =3D SYSTEMD_UNIT_FILES_IN =3D +OPENRC_INIT_FILES =3D +OPENRC_INIT_FILES_IN =3D +OPENRC_CONF_FILES =3D SYSCONF_FILES =3D sbin_PROGRAMS =3D man8_MANS =3D @@ -601,7 +604,9 @@ libvirt_lxc_la_LDFLAGS =3D \ libvirt_lxc_la_CFLAGS =3D $(AM_CFLAGS) libvirt_lxc_la_LIBADD =3D libvirt.la $(CYGWIN_EXTRA_LIBADD) =20 -EXTRA_DIST +=3D $(SYSCONF_FILES) +EXTRA_DIST +=3D \ + $(SYSCONF_FILES) \ + $(OPENRC_CONF_FILES) =20 install-sysconfig: $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig @@ -620,6 +625,25 @@ uninstall-sysconfig: done rmdir $(DESTDIR)$(sysconfdir)/sysconfig || : =20 +OPENRC_CONF_DIR =3D $(sysconfdir)/conf.d + +install-openrc-conf: + $(MKDIR_P) $(DESTDIR)$(OPENRC_CONF_DIR) + for f in $(OPENRC_CONF_FILES:%.confd=3D%) ; \ + do \ + tgt=3D`basename $$f`; \ + $(INSTALL_DATA) $(srcdir)/$$f.confd \ + $(DESTDIR)$(OPENRC_CONF_DIR)/$$tgt; \ + done + +uninstall-openrc-conf: + for f in $(OPENRC_CONF_FILES:%.confd=3D%) ; \ + do \ + tgt=3D`basename $$f`; \ + rm -f $(DESTDIR)$(OPENRC_CONF_DIR)/$$tgt; \ + done + rmdir $(DESTDIR)$(OPENRC_CONF_DIR) || : + LOGROTATE_FILES :=3D $(LOGROTATE_FILES_IN:remote/%.in=3D%) =20 EXTRA_DIST +=3D $(LOGROTATE_FILES_IN) @@ -665,6 +689,7 @@ CLEANFILES +=3D \ =20 EXTRA_DIST +=3D \ $(SYSTEMD_UNIT_FILES_IN) \ + $(OPENRC_INIT_FILES_IN) \ $(PODFILES) \ $(NULL) =20 @@ -691,6 +716,35 @@ uninstall-systemd: uninstall-sysconfig INSTALL_DATA_LOCAL +=3D install-systemd UNINSTALL_LOCAL +=3D uninstall-systemd endif LIBVIRT_INIT_SCRIPT_SYSTEMD + +if LIBVIRT_INIT_SCRIPT_OPENRC + +OPENRC_INIT_DIR =3D $(sysconfdir)/init.d + +BUILT_SOURCES +=3D $(OPENRC_INIT_FILES) +DISTCLEANFILES +=3D $(OPENRC_INIT_FILES) + +install-openrc: $(OPENRC_INIT_FILES) install-openrc-conf + $(MKDIR_P) $(DESTDIR)$(OPENRC_INIT_DIR) + for f in $(OPENRC_INIT_FILES:%.init=3D%) ; \ + do \ + tgt=3D`basename $$f`; \ + $(INSTALL_SCRIPT) $$f.init \ + $(DESTDIR)$(OPENRC_INIT_DIR)/$$tgt ; \ + done + +uninstall-openrc: uninstall-openrc-conf + for f in $(OPENRC_INIT_FILES:%.init=3D%) ; \ + do \ + tgt=3D`basename $$f`; \ + rm -f $(DESTDIR)$(OPENRC_INIT_DIR)/$$tgt ; \ + done + rmdir $(DESTDIR)$(OPENRC_INIT_DIR) || : + +INSTALL_DATA_LOCAL +=3D install-openrc +UNINSTALL_LOCAL +=3D uninstall-openrc +endif LIBVIRT_INIT_SCRIPT_OPENRC + endif WITH_LIBVIRTD =20 =20 diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am index 34acdb7566..3df1d106a7 100644 --- a/src/interface/Makefile.inc.am +++ b/src/interface/Makefile.inc.am @@ -72,6 +72,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ interface/virtinterfaced.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtinterfaced.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + interface/virtinterfaced.init.in \ + $(NULL) + VIRTINTERFACED_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt interface|g' \ @@ -79,6 +86,10 @@ VIRTINTERFACED_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtinterfaced|g' \ $(NULL) =20 +virtinterfaced.init: interface/virtinterfaced.init.in \ + $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtinterfaced.service: interface/virtinterfaced.service.in \ $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTINTERFACED_UNIT_VARS) $< > $@-t && mv $@-t $@ diff --git a/src/interface/virtinterfaced.init.in b/src/interface/virtinter= faced.init.in new file mode 100644 index 0000000000..4653cb1e16 --- /dev/null +++ b/src/interface/virtinterfaced.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization interface daemon" + +VIRTINTERFACED_OPTS=3D${VIRTINTERFACED_OPTS:-"${VIRTINTERFACED_OPTS}"} +VIRTINTERFACED_TIMEOUT=3D${VIRTINTERFACED_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtinterfaced" +command_args=3D"-d ${VIRTINTERFACED_OPTS}" +pidfile=3D"@runstatedir@/virtinterfaced.pid" +retry=3D"${VIRTINTERFACED_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use dbus + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtinterfaced" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/libxl/Makefile.inc.am b/src/libxl/Makefile.inc.am index 03b4d2fad4..5d40724c3b 100644 --- a/src/libxl/Makefile.inc.am +++ b/src/libxl/Makefile.inc.am @@ -83,6 +83,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ libxl/virtxend.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtxend.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + libxl/virtxend.init.in \ + $(NULL) + LIBXL_UNIT_COND =3D ConditionPathExists=3D/proc/xen/capabilities LIBXL_UNIT_CONFLICT =3D Conflicts=3D$(LIBVIRTD_SOCKET_UNIT_FILES) =20 @@ -94,6 +101,9 @@ VIRTXEND_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtxend|g' \ $(NULL) =20 +virtxend.init: libxl/virtxend.init.in $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtxend.service: libxl/virtxend.service.in $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTXEND_UNIT_VARS) $< > $@-t && mv $@-t $@ =20 diff --git a/src/libxl/virtxend.init.in b/src/libxl/virtxend.init.in new file mode 100644 index 0000000000..9159d6b795 --- /dev/null +++ b/src/libxl/virtxend.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization xen daemon" + +VIRTXEND_OPTS=3D${VIRTXEND_OPTS:-"${VIRTXEND_OPTS}"} +VIRTXEND_TIMEOUT=3D${VIRTXEND_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtxend" +command_args=3D"-d ${VIRTXEND_OPTS}" +pidfile=3D"@runstatedir@/virtxend.pid" +retry=3D"${VIRTXEND_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use dbus + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtxend" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/lxc/Makefile.inc.am b/src/lxc/Makefile.inc.am index 5eb0bb9ad7..26b20e2e03 100644 --- a/src/lxc/Makefile.inc.am +++ b/src/lxc/Makefile.inc.am @@ -146,6 +146,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ lxc/virtlxcd.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtlxcd.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + lxc/virtlxcd.init.in \ + $(NULL) + VIRTLXCD_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt lxc|g' \ @@ -153,6 +160,9 @@ VIRTLXCD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtlxcd|g' \ $(NULL) =20 +virtlxcd.init: lxc/virtlxcd.init.in $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtlxcd.service: lxc/virtlxcd.service.in $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTLXCD_UNIT_VARS) $< > $@-t && mv $@-t $@ =20 diff --git a/src/lxc/virtlxcd.init.in b/src/lxc/virtlxcd.init.in new file mode 100644 index 0000000000..48e80c29ab --- /dev/null +++ b/src/lxc/virtlxcd.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization lxc daemon" + +VIRTLXCD_OPTS=3D${VIRTLXCD_OPTS:-"${VIRTLXCD_OPTS}"} +VIRTLXCD_TIMEOUT=3D${VIRTLXCD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtlxcd" +command_args=3D"-d ${VIRTLXCD_OPTS}" +pidfile=3D"@runstatedir@/virtlxcd.pid" +retry=3D"${VIRTLXCD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtlxcd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am index 1cef1c7bce..3eeab74260 100644 --- a/src/network/Makefile.inc.am +++ b/src/network/Makefile.inc.am @@ -80,6 +80,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ network/virtnetworkd.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtnetworkd.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + network/virtnetworkd.init.in \ + $(NULL) + VIRTNETWORKD_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt network|g' \ @@ -87,6 +94,9 @@ VIRTNETWORKD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtnetworkd|g' \ $(NULL) =20 +virtnetworkd.init: network/virtnetworkd.init.in $(top_builddir)/config.sta= tus + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtnetworkd.service: network/virtnetworkd.service.in \ $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTNETWORKD_UNIT_VARS) $< > $@-t && mv $@-t $@ diff --git a/src/network/virtnetworkd.init.in b/src/network/virtnetworkd.in= it.in new file mode 100644 index 0000000000..7a683193a5 --- /dev/null +++ b/src/network/virtnetworkd.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization network daemon" + +VIRTNETWORKD_OPTS=3D${VIRTNETWORKD_OPTS:-"${VIRTNETWORKD_OPTS}"} +VIRTNETWORKD_TIMEOUT=3D${VIRTNETWORKD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtnetworkd" +command_args=3D"-d ${VIRTNETWORKD_OPTS}" +pidfile=3D"@runstatedir@/virtnetworkd.pid" +retry=3D"${VIRTNETWORKD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtnetworkd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/node_device/Makefile.inc.am b/src/node_device/Makefile.inc= .am index 58077ebddd..c29397464b 100644 --- a/src/node_device/Makefile.inc.am +++ b/src/node_device/Makefile.inc.am @@ -96,6 +96,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ node_device/virtnodedevd.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtnodedevd.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + node_device/virtnodedevd.init.in \ + $(NULL) + VIRTNODEDEVD_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt nodedev|g' \ @@ -103,6 +110,10 @@ VIRTNODEDEVD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtnodedevd|g' \ $(NULL) =20 +virtnodedevd.init: node_device/virtnodedevd.init.in \ + $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtnodedevd.service: node_device/virtnodedevd.service.in \ $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTNODEDEVD_UNIT_VARS) $< > $@-t && mv $@-t $@ diff --git a/src/node_device/virtnodedevd.init.in b/src/node_device/virtnod= edevd.init.in new file mode 100644 index 0000000000..8b5f8bb081 --- /dev/null +++ b/src/node_device/virtnodedevd.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization nodedev daemon" + +VIRTNODEDEVD_OPTS=3D${VIRTNODEDEVD_OPTS:-"${VIRTNODEDEVD_OPTS}"} +VIRTNODEDEVD_TIMEOUT=3D${VIRTNODEDEVD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtnodedevd" +command_args=3D"-d ${VIRTNODEDEVD_OPTS}" +pidfile=3D"@runstatedir@/virtnodedevd.pid" +retry=3D"${VIRTNODEDEVD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtnodedevd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am index b51c8a5cda..d571d5c713 100644 --- a/src/nwfilter/Makefile.inc.am +++ b/src/nwfilter/Makefile.inc.am @@ -81,6 +81,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ nwfilter/virtnwfilterd.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtnwfilterd.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + nwfilter/virtnwfilterd.init.in \ + $(NULL) + VIRTNWFILTERD_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt nwfilter|g' \ @@ -88,6 +95,10 @@ VIRTNWFILTERD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtnwfilterd|g' \ $(NULL) =20 +virtnwfilterd.init: nwfilter/virtnwfilterd.init.in \ + $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtnwfilterd.service: nwfilter/virtnwfilterd.service.in \ $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTNWFILTERD_UNIT_VARS) $< > $@-t && mv $@-t $@ diff --git a/src/nwfilter/virtnwfilterd.init.in b/src/nwfilter/virtnwfilter= d.init.in new file mode 100644 index 0000000000..76a9adfe48 --- /dev/null +++ b/src/nwfilter/virtnwfilterd.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization nwfilter daemon" + +VIRTNWFILTERD_OPTS=3D${VIRTNWFILTERD_OPTS:-"${VIRTNWFILTERD_OPTS}"} +VIRTNWFILTERD_TIMEOUT=3D${VIRTNWFILTERD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtnwfilterd" +command_args=3D"-d ${VIRTNWFILTERD_OPTS}" +pidfile=3D"@runstatedir@/virtnwfilterd.pid" +retry=3D"${VIRTNWFILTERD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtnwfilterd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/qemu/Makefile.inc.am b/src/qemu/Makefile.inc.am index bf30f8a3c5..da849ae1c3 100644 --- a/src/qemu/Makefile.inc.am +++ b/src/qemu/Makefile.inc.am @@ -152,6 +152,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ qemu/virtqemud.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtqemud.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + qemu/virtqemud.init.in \ + $(NULL) + VIRTQEMUD_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt qemu|g' \ @@ -159,6 +166,9 @@ VIRTQEMUD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtqemud|g' \ $(NULL) =20 +virtqemud.init: qemu/virtqemud.init.in $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtqemud.service: qemu/virtqemud.service.in $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTQEMUD_UNIT_VARS) $< > $@-t && mv $@-t $@ =20 diff --git a/src/qemu/virtqemud.init.in b/src/qemu/virtqemud.init.in new file mode 100644 index 0000000000..b7c385db18 --- /dev/null +++ b/src/qemu/virtqemud.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization qemu daemon" + +VIRTQEMUD_OPTS=3D${VIRTQEMUD_OPTS:-"${VIRTQEMUD_OPTS}"} +VIRTQEMUD_TIMEOUT=3D${VIRTQEMUD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtqemud" +command_args=3D"-d ${VIRTQEMUD_OPTS}" +pidfile=3D"@runstatedir@/virtqemud.pid" +retry=3D"${VIRTQEMUD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtqemud" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 8103cfb96a..1fe438c830 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -129,6 +129,19 @@ SYSTEMD_UNIT_FILES_IN +=3D \ $(GUEST_UNIT_FILES_IN) \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + libvirtd.init \ + virtproxyd.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + remote/libvirtd.init.in \ + remote/virtproxyd.init.in \ + $(NULL) +OPENRC_CONF_FILES +=3D \ + remote/libvirtd.confd \ + remote/virtproxyd.confd \ + $(NULL) + REMOTE_PROTOCOL =3D $(srcdir)/remote/remote_protocol.x LXC_PROTOCOL =3D $(srcdir)/remote/lxc_protocol.x QEMU_PROTOCOL =3D $(srcdir)/remote/qemu_protocol.x @@ -398,6 +411,17 @@ LIBVIRTD_UNIT_VARS =3D \ -e 's|[@]deps[@]||g' \ $(NULL) =20 +LIBVIRTD_INIT_VARS =3D \ + $(COMMON_UNIT_VARS) + +if WITH_FIREWALLD +LIBVIRTD_INIT_VARS +=3D \ + -e 's|[@]NEED_FIREWALLD[@]|need firewalld|g' +else ! WITH_FIREWALLD +LIBVIRTD_INIT_VARS +=3D \ + -e 's|[@]NEED_FIREWALLD[@]||g' +endif ! WITH_FIREWALLD + VIRTD_UNIT_VARS =3D \ $(COMMON_UNIT_VARS) \ -e 's|[@]deps[@]|Conflicts=3D$(LIBVIRTD_SOCKET_UNIT_FILES)|g' \ @@ -410,6 +434,12 @@ VIRTPROXYD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|libvirt|g' \ $(NULL) =20 +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 $@ + libvirtd.service: remote/libvirtd.service.in $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(LIBVIRTD_UNIT_VARS) $< > $@-t && mv $@-t $@ =20 diff --git a/src/remote/libvirtd.confd b/src/remote/libvirtd.confd new file mode 100644 index 0000000000..c326531d46 --- /dev/null +++ b/src/remote/libvirtd.confd @@ -0,0 +1,18 @@ +# /etc/conf.d/libvirtd + +# Startup dependency +# libvirtd typically requires all networks to be up and settled which +# is what rc_need=3D"net" provides. However if you only use specific netwo= rks +# for libvirtd, you may override this. Or if you only use libvirtd locally. +rc_need=3D"net" + +# The termination timeout (start-stop-daemon parameter "retry") ensures +# that the service will be terminated within a given time (25 + 5 seconds +# per default) when you are stopping the service. +#LIBVIRTD_TERMTIMEOUT=3D"TERM/25/KILL/5" + +# LIBVIRTD_OPTS +# You may want to add '--listen' to have libvirtd listen for tcp/ip connec= tions +# if you want to use libvirt for remote control +# Please consult 'libvirtd --help' for more options +#LIBVIRTD_OPTS=3D"--listen" diff --git a/src/remote/libvirtd.init.in b/src/remote/libvirtd.init.in new file mode 100644 index 0000000000..b708befbc5 --- /dev/null +++ b/src/remote/libvirtd.init.in @@ -0,0 +1,29 @@ +#!/sbin/openrc-run + +description=3D"Virtualization daemon" + +LIBVIRTD_OPTS=3D${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"} +LIBVIRTD_TIMEOUT=3D${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/libvirtd" +command_args=3D"-d ${LIBVIRTD_OPTS}" +start_stop_daemon_args=3D"--env KRB5_KTNAME=3D/etc/libvirt/krb5.tab" +pidfile=3D"@runstatedir@/libvirtd.pid" +retry=3D"${LIBVIRTD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + need virtlogd + @NEED_FIREWALLD@ + use ceph dbus iscsid virtlockd + after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-c= lient ntpdportmap rpc.statd sanlock xenconsoled +} + +reload() { + ebegin "re-exec() libvirtd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/remote/virtproxyd.confd b/src/remote/virtproxyd.confd new file mode 100644 index 0000000000..6503c14dd7 --- /dev/null +++ b/src/remote/virtproxyd.confd @@ -0,0 +1,10 @@ +# /etc/conf.d/virtproxyd + +# The termination timeout (start-stop-daemon parameter "retry") ensures +# that the service will be terminated within a given time (25 + 5 seconds +# per default) when you are stopping the service. +#VIRTPROXYD_TERMTIMEOUT=3D"TERM/25/KILL/5" + +# VIRTPROXYD_OPTS +# Please consult 'virtproxyd --help' for more options +#VIRTPROXYD_OPTS=3D"" diff --git a/src/remote/virtproxyd.init.in b/src/remote/virtproxyd.init.in new file mode 100644 index 0000000000..b644c084a9 --- /dev/null +++ b/src/remote/virtproxyd.init.in @@ -0,0 +1,28 @@ +#!/sbin/openrc-run + +description=3D"Virtualization daemon proxy" + +VIRTPROXYD_OPTS=3D${VIRTPROXYD_OPTS:-"${VIRTPROXYD_OPTS}"} +VIRTPROXYD_TIMEOUT=3D${VIRTPROXYD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtproxyd" +command_args=3D"-d ${VIRTPROXYD_OPTS}" +start_stop_daemon_args=3D"--env KRB5_KTNAME=3D/etc/libvirt/krb5.tab" +pidfile=3D"@runstatedir@/virtproxyd.pid" +retry=3D"${VIRTPROXYD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use dbus + after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-c= lient ntpdportmap rpc.statd sanlock xenconsoled + need net +} + +reload() { + ebegin "re-exec() virtproxyd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/secret/Makefile.inc.am b/src/secret/Makefile.inc.am index 959d21099d..d332060e38 100644 --- a/src/secret/Makefile.inc.am +++ b/src/secret/Makefile.inc.am @@ -69,6 +69,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ secret/virtsecretd.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtsecretd.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + secret/virtsecretd.init.in \ + $(NULL) + VIRTSECRETD_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt secret|g' \ @@ -76,6 +83,9 @@ VIRTSECRETD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtsecretd|g' \ $(NULL) =20 +virtsecretd.init: secret/virtsecretd.init.in $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtsecretd.service: secret/virtsecretd.service.in \ $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTSECRETD_UNIT_VARS) $< > $@-t && mv $@-t $@ diff --git a/src/secret/virtsecretd.init.in b/src/secret/virtsecretd.init.in new file mode 100644 index 0000000000..6deecae8cb --- /dev/null +++ b/src/secret/virtsecretd.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization secret daemon" + +VIRTSECRETD_OPTS=3D${VIRTSECRETD_OPTS:-"${VIRTSECRETD_OPTS}"} +VIRTSECRETD_TIMEOUT=3D${VIRTSECRETD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtsecretd" +command_args=3D"-d ${VIRTSECRETD_OPTS}" +pidfile=3D"@runstatedir@/virtsecretd.pid" +retry=3D"${VIRTSECRETD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtsecretd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am index 3d453029a7..3808079fde 100644 --- a/src/storage/Makefile.inc.am +++ b/src/storage/Makefile.inc.am @@ -173,6 +173,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ storage/virtstoraged.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtstoraged.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + storage/virtstoraged.init.in \ + $(NULL) + VIRTSTORAGED_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt storage|g' \ @@ -180,6 +187,9 @@ VIRTSTORAGED_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtstoraged|g' \ $(NULL) =20 +virtstoraged.init: storage/virtstoraged.init.in $(top_builddir)/config.sta= tus + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtstoraged.service: storage/virtstoraged.service.in \ $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTSTORAGED_UNIT_VARS) $< > $@-t && mv $@-t $@ diff --git a/src/storage/virtstoraged.init.in b/src/storage/virtstoraged.in= it.in new file mode 100644 index 0000000000..24e1a68af7 --- /dev/null +++ b/src/storage/virtstoraged.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization storage daemon" + +VIRTSTORAGED_OPTS=3D${VIRTSTORAGED_OPTS:-"${VIRTSTORAGED_OPTS}"} +VIRTSTORAGED_TIMEOUT=3D${VIRTSTORAGED_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtstoraged" +command_args=3D"-d ${VIRTSTORAGED_OPTS}" +pidfile=3D"@runstatedir@/virtstoraged.pid" +retry=3D"${VIRTSTORAGED_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtstoraged" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/vbox/Makefile.inc.am b/src/vbox/Makefile.inc.am index 37da9b0aae..57f7987dc8 100644 --- a/src/vbox/Makefile.inc.am +++ b/src/vbox/Makefile.inc.am @@ -92,6 +92,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ vbox/virtvboxd.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtvboxd.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + vbox/virtvboxd.init.in \ + $(NULL) + VIRTVBOXD_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt vbox|g' \ @@ -99,6 +106,9 @@ VIRTVBOXD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtvboxd|g' \ $(NULL) =20 +virtvboxd.init: vbox/virtvboxd.init.in $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtvboxd.service: vbox/virtvboxd.service.in $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTVBOXD_UNIT_VARS) $< > $@-t && mv $@-t $@ =20 diff --git a/src/vbox/virtvboxd.init.in b/src/vbox/virtvboxd.init.in new file mode 100644 index 0000000000..dfee0409f6 --- /dev/null +++ b/src/vbox/virtvboxd.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization vbox daemon" + +VIRTVBOXD_OPTS=3D${VIRTVBOXD_OPTS:-"${VIRTVBOXD_OPTS}"} +VIRTVBOXD_TIMEOUT=3D${VIRTVBOXD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtvboxd" +command_args=3D"-d ${VIRTVBOXD_OPTS}" +pidfile=3D"@runstatedir@/virtvboxd.pid" +retry=3D"${VIRTVBOXD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtvboxd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/src/vz/Makefile.inc.am b/src/vz/Makefile.inc.am index 7dd20e8013..e21eab6c92 100644 --- a/src/vz/Makefile.inc.am +++ b/src/vz/Makefile.inc.am @@ -67,6 +67,13 @@ SYSTEMD_UNIT_FILES_IN +=3D \ vz/virtvzd.service.in \ $(NULL) =20 +OPENRC_INIT_FILES +=3D \ + virtvzd.init \ + $(NULL) +OPENRC_INIT_FILES_IN +=3D \ + vz/virtvzd.init.in \ + $(NULL) + VIRTVZD_UNIT_VARS =3D \ $(VIRTD_UNIT_VARS) \ -e 's|[@]name[@]|Libvirt vz|g' \ @@ -74,6 +81,9 @@ VIRTVZD_UNIT_VARS =3D \ -e 's|[@]sockprefix[@]|virtvzd|g' \ $(NULL) =20 +virtvzd.init: vz/virtvzd.init.in $(top_builddir)/config.status + $(AM_V_GEN)$(SED) $(LIBVIRTD_INIT_VARS) $< > $@-t && mv $@-t $@ + virtvzd.service: vz/virtvzd.service.in $(top_builddir)/config.status $(AM_V_GEN)$(SED) $(VIRTVZD_UNIT_VARS) $< > $@-t && mv $@-t $@ =20 diff --git a/src/vz/virtvzd.init.in b/src/vz/virtvzd.init.in new file mode 100644 index 0000000000..677419adeb --- /dev/null +++ b/src/vz/virtvzd.init.in @@ -0,0 +1,26 @@ +#!/sbin/openrc-run + +description=3D"Virtualization vz daemon" + +VIRTVZD_OPTS=3D${VIRTVZD_OPTS:-"${VIRTVZD_OPTS}"} +VIRTVZD_TIMEOUT=3D${VIRTVZD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command=3D"@sbindir@/virtvzd" +command_args=3D"-d ${VIRTVZD_OPTS}" +pidfile=3D"@runstatedir@/virtvzd.pid" +retry=3D"${VIRTVZD_TERMTIMEOUT}" + +extra_started_commands=3D"reload" +description_reload=3D"re-exec the daemon to enforce configuration reload" + +depend() { + use ceph dbus iscsid virtlockd + after nfs nfsmount +} + +reload() { + ebegin "re-exec() virtvzd" + + start-stop-daemon --signal SIGHUP \ + --exec "${command}" --pidfile "${pidfile}" +} --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 16 04:25:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574779628; cv=none; d=zohomail.com; s=zohoarc; b=IEif7eqe3jXgPFtoxo8r6cbmMdMLuIdu13mKnUlW9/qi2D4V+GShedSnPnvUNtXM4b2sZRKdts0U1ITFABJl6BytrvolxtnoNqIIxpQAgvbBi4bP8cHU4C+Mw3fxM2KPlX2SzzaDoH9w1wy0EKm6Bij9+kA0Pjs6ueIw5bdD4To= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574779628; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HQ2e09UG2TXrgNhjZ1kkXkRvxJ8SxvzOM17md8lrkgQ=; b=hYPlAQzcSZcSFszsaJTrXGRumL9M5dHblGSu4uGKlLUGxBixUwm2pqEY6+58HbD6pIQX3rkHZ1jfLQByrJ0psfrVQBebcREuieXaePdU+9JxvgwIqzxJRwbeTtQPGQskWgxfIrkrV5OmfSxCyJGXYnjyl/eyfb5Zw2Fdhb3HqOY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1574779628346888.8194828230344; Tue, 26 Nov 2019 06:47:08 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-405-BBJEh66BNOKwSG_lpRFXuA-1; Tue, 26 Nov 2019 09:47:05 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C8048C0450; Tue, 26 Nov 2019 14:46:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D5BEE5D9D6; Tue, 26 Nov 2019 14:46:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9526A4A460; Tue, 26 Nov 2019 14:46:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAQEkK9p010482 for ; Tue, 26 Nov 2019 09:46:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0C25A60C87; Tue, 26 Nov 2019 14:46:20 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85E4160CCC for ; Tue, 26 Nov 2019 14:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574779627; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=HQ2e09UG2TXrgNhjZ1kkXkRvxJ8SxvzOM17md8lrkgQ=; b=jB4T/EuVbj7/HxjqJqBC7FdngBFC0BHWgNv/es7KTo9Rp2URfiBUHnSA0KtC2ojJxiAZzA vIRgy5O9VDrHPTjzhSJvo/Z9i3teJbFe6iPrH1UZZuDym5QNQ4EYp8rNdaBLbi7yPM/m8s h5t86KBVZiRGOaRnhIDTWRK4uDCLXaA= From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 26 Nov 2019 15:46:12 +0100 Message-Id: <424b1e18e73c4a1283d92da824e42e1e191583ac.1574779188.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] news: Document init scripts X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: BBJEh66BNOKwSG_lpRFXuA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/news.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 72c0edb317..89b9167634 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -81,6 +81,17 @@
+ + + Provide init scripts for sub-deaemons + + + So far libvirt shipped systemd unit files for sub-daemons. With = this + release, init scripts are available too. Package maintainers can + choose which one to install via --with-init-script + configure option. + +
--=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list