提交 59d6e65d 编写于 作者: M Michael Chapman 提交者: Michal Privoznik

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: NMichael Chapman <mike@very.puzzling.org>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 1163fa36
......@@ -9,9 +9,11 @@
# Should-Start: $named
# Should-Start: xend
# Should-Start: avahi-daemon
# Should-Start: virtlockd
# Required-Stop: $network messagebus
# Should-Stop: $named
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: daemon for libvirt virtualization API
# Description: This is a daemon for managing guest instances
# and libvirt virtual networks
......
......@@ -5,7 +5,8 @@
#
### BEGIN INIT INFO
# Provides: virtlockd
# Default-Start: 3 4 5
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: virtual machine lock manager
# Description: This is a daemon for managing locks
# on virtual machine disk images
......@@ -15,12 +16,12 @@
#
# virtlockd: virtual machine lock manager
#
# chkconfig: 345 97 03
# chkconfig: - 96 04
# description: This is a daemon for managing locks \
# on virtual machine disk images
#
# processname: virtlockd
# pidfile: @localstatedir@/run/libvirt/virtlockd.pid
# pidfile: @localstatedir@/run/virtlockd.pid
#
# Source function library.
......@@ -28,7 +29,7 @@
SERVICE=virtlockd
PROCESS=virtlockd
PIDFILE=@localstatedir@/run/libvirt/lockd/$SERVICE.pid
PIDFILE=@localstatedir@/run/$SERVICE.pid
VIRTLOCKD_ARGS=
......@@ -64,7 +65,7 @@ restart() {
reload() {
echo -n $"Reloading $SERVICE configuration: "
killproc -p $PIDFILE $PROCESS -HUP
killproc -p $PIDFILE $PROCESS -USR1
RETVAL=$?
echo
return $RETVAL
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册