mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
Add virtlockd and virtlogd init scripts
These are missing files for OpenRC. Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2f06757048
commit
f4b1c020a2
@ -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
|
||||
@ -275,6 +282,8 @@ locking/lock_daemon_dispatch_stubs.h: $(LOCK_PROTOCOL) \
|
||||
virLockSpaceProtocol VIR_LOCK_SPACE_PROTOCOL \
|
||||
$(LOCK_PROTOCOL) > locking/lock_daemon_dispatch_stubs.h
|
||||
|
||||
virtlockd.init: locking/virtlockd.init.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)$(SED) $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@
|
||||
|
||||
virtlockd.service: locking/virtlockd.service.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN)sed $(COMMON_UNIT_VARS) $< > $@-t && mv $@-t $@
|
||||
|
24
src/locking/virtlockd.init.in
Normal file
24
src/locking/virtlockd.init.in
Normal file
@ -0,0 +1,24 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="Virtualization locking daemon"
|
||||
|
||||
VIRTLOCKD_OPTS=${VIRTLOCKD_OPTS:-"${VIRTLOCKD_OPTS}"}
|
||||
|
||||
command="@sbindir@/virtlockd"
|
||||
command_args="${VIRTLOCKD_OPTS}"
|
||||
supervisor="supervise-daemon"
|
||||
|
||||
extra_started_commands="reload"
|
||||
description_reload="re-exec the daemon to enforce configuration reload"
|
||||
|
||||
depend() {
|
||||
keyword -shutdown
|
||||
after nfs nfsmount
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "re-exec() virtlockd"
|
||||
|
||||
${supervisor} ${RC_SVCNAME} --signal HUP
|
||||
eend $?
|
||||
}
|
@ -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 $@
|
||||
|
||||
|
24
src/logging/virtlogd.init.in
Normal file
24
src/logging/virtlogd.init.in
Normal file
@ -0,0 +1,24 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="Virtualization logging daemon"
|
||||
|
||||
VIRTLOGD_OPTS=${VIRTLOGD_OPTS:-"${VIRTLOGD_OPTS}"}
|
||||
|
||||
command="@sbindir@/virtlogd"
|
||||
command_args="${VIRTLOGD_OPTS}"
|
||||
supervisor="supervise-daemon"
|
||||
|
||||
extra_started_commands="reload"
|
||||
description_reload="re-exec the daemon to enforce configuration reload"
|
||||
|
||||
depend() {
|
||||
keyword -shutdown
|
||||
after nfs nfsmount
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "re-exec() virtlogd"
|
||||
|
||||
${supervisor} ${RC_SVCNAME} --signal HUP
|
||||
eend $?
|
||||
}
|
Loading…
Reference in New Issue
Block a user