mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virtlockd: improve initscripts
- Use SIGUSR1, not SIGHUP, on reload. At present, virtlockd only responds to the former. - Fix PID file for virtlockd. - Do not start virtlockd in any runlevels by default. It needs to be explicitly selected in libvirt's qemu.conf anyway, so there is no need to have it running on all systems regardless. - Fix chkconfig priorities to ensure virtlockd is started before libvirtd is started, and stopped after libvirtd is stopped. - Add "Should-Start: virtlockd" to the libvirtd initscript's LSB header, for the same reason. - Add "Default-Stop" to both libvirtd and virtlockd initscripts. LSB does not guarantee that this defaults to the inverse of "Default-Start". Signed-off-by: Michael Chapman <mike@very.puzzling.org> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
1163fa36b7
commit
59d6e65d6c
@@ -9,9 +9,11 @@
|
|||||||
# Should-Start: $named
|
# Should-Start: $named
|
||||||
# Should-Start: xend
|
# Should-Start: xend
|
||||||
# Should-Start: avahi-daemon
|
# Should-Start: avahi-daemon
|
||||||
|
# Should-Start: virtlockd
|
||||||
# Required-Stop: $network messagebus
|
# Required-Stop: $network messagebus
|
||||||
# Should-Stop: $named
|
# Should-Stop: $named
|
||||||
# Default-Start: 3 4 5
|
# Default-Start: 3 4 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
# Short-Description: daemon for libvirt virtualization API
|
# Short-Description: daemon for libvirt virtualization API
|
||||||
# Description: This is a daemon for managing guest instances
|
# Description: This is a daemon for managing guest instances
|
||||||
# and libvirt virtual networks
|
# and libvirt virtual networks
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
#
|
#
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: virtlockd
|
# Provides: virtlockd
|
||||||
# Default-Start: 3 4 5
|
# Default-Start:
|
||||||
|
# Default-Stop: 0 1 2 3 4 5 6
|
||||||
# Short-Description: virtual machine lock manager
|
# Short-Description: virtual machine lock manager
|
||||||
# Description: This is a daemon for managing locks
|
# Description: This is a daemon for managing locks
|
||||||
# on virtual machine disk images
|
# on virtual machine disk images
|
||||||
@@ -15,12 +16,12 @@
|
|||||||
#
|
#
|
||||||
# virtlockd: virtual machine lock manager
|
# virtlockd: virtual machine lock manager
|
||||||
#
|
#
|
||||||
# chkconfig: 345 97 03
|
# chkconfig: - 96 04
|
||||||
# description: This is a daemon for managing locks \
|
# description: This is a daemon for managing locks \
|
||||||
# on virtual machine disk images
|
# on virtual machine disk images
|
||||||
#
|
#
|
||||||
# processname: virtlockd
|
# processname: virtlockd
|
||||||
# pidfile: @localstatedir@/run/libvirt/virtlockd.pid
|
# pidfile: @localstatedir@/run/virtlockd.pid
|
||||||
#
|
#
|
||||||
|
|
||||||
# Source function library.
|
# Source function library.
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
|
|
||||||
SERVICE=virtlockd
|
SERVICE=virtlockd
|
||||||
PROCESS=virtlockd
|
PROCESS=virtlockd
|
||||||
PIDFILE=@localstatedir@/run/libvirt/lockd/$SERVICE.pid
|
PIDFILE=@localstatedir@/run/$SERVICE.pid
|
||||||
|
|
||||||
VIRTLOCKD_ARGS=
|
VIRTLOCKD_ARGS=
|
||||||
|
|
||||||
@@ -64,7 +65,7 @@ restart() {
|
|||||||
reload() {
|
reload() {
|
||||||
echo -n $"Reloading $SERVICE configuration: "
|
echo -n $"Reloading $SERVICE configuration: "
|
||||||
|
|
||||||
killproc -p $PIDFILE $PROCESS -HUP
|
killproc -p $PIDFILE $PROCESS -USR1
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
echo
|
echo
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
|
|||||||
Reference in New Issue
Block a user