Re: [PATCH 2/6] virtlockd: improve initscripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09.12.2013 07:23, Michael Chapman wrote:
> - 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@xxxxxxxxxxxxxxxxx>
> ---
>  daemon/libvirtd.init.in       |  2 ++
>  src/locking/virtlockd.init.in | 11 ++++++-----
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/daemon/libvirtd.init.in b/daemon/libvirtd.init.in
> index f66ddad..ed42195 100644
> --- a/daemon/libvirtd.init.in
> +++ b/daemon/libvirtd.init.in
> @@ -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
> diff --git a/src/locking/virtlockd.init.in b/src/locking/virtlockd.init.in
> index 1adea07..0913727 100644
> --- a/src/locking/virtlockd.init.in
> +++ b/src/locking/virtlockd.init.in
> @@ -5,7 +5,8 @@
>  #
>  ### BEGIN INIT INFO
>  # Provides: virtlockd
> -# Default-Start: 3 4 5
> +# Default-Start: 

Spurious space.

> +# 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
> 

Fixed & pushed.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]