From 6dc0e4f1718743a95050081fc06fa0fe06af281c Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Thu, 7 Jan 2016 09:50:26 +0100 Subject: [PATCH] Fix LSB requirements in service script and sync them Commit b22344f3285187ee1768d6e031bc0ff20e32552d mistakenly reordered Default-* lines. Thanks to that I noticed that we are very inconsistent with our init scripts, so I took the liberty of synchronizing them, updating them and making them all look shiny and new. So apart from fixing the LSB requirements, I also fixed the ordering, specified runlevels and fix the link to the reference specification. Signed-off-by: Martin Kletzander --- daemon/libvirtd.init.in | 13 +++++-------- src/locking/virtlockd.init.in | 12 ++++++++---- src/logging/virtlogd.init.in | 8 ++++---- tools/libvirt-guests.init.in | 9 ++++++--- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/daemon/libvirtd.init.in b/daemon/libvirtd.init.in index 22006c448c..164732905d 100644 --- a/daemon/libvirtd.init.in +++ b/daemon/libvirtd.init.in @@ -1,19 +1,16 @@ #!/bin/sh # the following is the LSB init header see -# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV +# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # ### BEGIN INIT INFO # Provides: libvirtd -# Required-Start: $network messagebus virtlogd -# 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 +# Required-Start: $network messagebus virtlogd +# Required-Stop: $network messagebus +# Should-Start: $named xend avahi-daemon virtlockd +# Should-Stop: $named # 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 596bb62414..0bf868ca7f 100644 --- a/src/locking/virtlockd.init.in +++ b/src/locking/virtlockd.init.in @@ -1,12 +1,16 @@ #!/bin/sh # the following is the LSB init header see -# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV +# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # ### BEGIN INIT INFO # Provides: virtlockd -# Default-Start: -# Default-Stop: 0 1 2 3 4 5 6 +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Required-Start: +# Required-Stop: +# Should-Start: $network $remote_fs +# Should-Stop: $network $remote_fs # Short-Description: virtual machine lock manager # Description: This is a daemon for managing locks # on virtual machine disk images @@ -16,7 +20,7 @@ # # virtlockd: virtual machine lock manager # -# chkconfig: - 96 04 +# chkconfig: 345 96 04 # description: This is a daemon for managing locks \ # on virtual machine disk images # diff --git a/src/logging/virtlogd.init.in b/src/logging/virtlogd.init.in index 89b243dc05..6aa8815046 100644 --- a/src/logging/virtlogd.init.in +++ b/src/logging/virtlogd.init.in @@ -1,16 +1,16 @@ #!/bin/sh # the following is the LSB init header see -# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV +# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # ### BEGIN INIT INFO # Provides: virtlogd -# Default-Start: 3 5 +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 # Required-Start: # Required-Stop: # Should-Start: $network $remote_fs # Should-Stop: $network $remote_fs -# Default-Stop: 0 1 2 4 6 # Short-Description: virtual machine log manager # Description: This is a daemon for managing logs # of virtual machine consoles @@ -20,7 +20,7 @@ # # virtlogd: virtual machine log manager # -# chkconfig: - 96 04 +# chkconfig: 345 96 04 # description: This is a daemon for managing logs \ # of virtual machine consoles # diff --git a/tools/libvirt-guests.init.in b/tools/libvirt-guests.init.in index 5f9a60e81f..7709df3b96 100644 --- a/tools/libvirt-guests.init.in +++ b/tools/libvirt-guests.init.in @@ -1,13 +1,16 @@ #!/bin/sh -# the following is the LSB init header +# the following is the LSB init header see +# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # ### BEGIN INIT INFO # Provides: libvirt-guests +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 # Required-Start: libvirtd # Required-Stop: libvirtd -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 +# Should-Start: +# Should-Stop: # Short-Description: suspend/resume libvirt guests on shutdown/boot # Description: This is a script for suspending active libvirt guests # on shutdown and resuming them on next boot