Bug 1339 - Bug#547334: vzctl: Incorrect dependencies in init.d script header
Bug#547334: vzctl: Incorrect dependencies in init.d script header
Product: OpenVZ
Classification: Unclassified
Component: vzctl
All Debian
: P2 major
Assigned To: Igor Sukhih
Depends on:
  Show dependency treegraph
Reported: 2009-09-23 01:57 EDT by Ola Lundqvist
Modified: 2015-04-01 14:42 EDT (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ola Lundqvist 2009-09-23 01:57:39 EDT

Debian has got this bug report. The fix is easy.

Best regards,

// Ola


Package:  vzctl
Version:  3.0.10-1
Severity: important
Tags:     patch
User:     initscripts-ng-devel@lists.alioth.debian.org
Usertags: incorrect-dependencies

With dependency based boot sequencing, I discovered what I believe is
a bug in the init.d script.  The script have a hard dependency on
sshd, yet the package do not depend on openssh-server.  This make me
believe the sshd dependency should be optional.  The script is also
lacking stop dependencies.  The $local_fs dependency is redundant when
depending on $remote_fs.  The script used to start after $syslog, and
should probably continue to do so.

The hard dependency on sshd make the package fail to install.  See
<URL: http://piuparts.debian.org/sid/fail/vzctl_3.0.23-7.log > for the
test log.  Setting severity to important because this problem will not
affect everyone, only those without openssh-server already installed.

<URL: http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/initscrcomconv.html >
documents the LSB header format.  Some debian notes are available from
<URL: http://wiki.debian.org/LSBInitScripts >.

This patch solve the problem.

diff -ur ../vzctl-3.0.23/etc/init.d/vz-redhat.in ../vzctl-3.0.23-pere/etc/init.d/vz-redhat.in
--- ../vzctl-3.0.23/etc/init.d/vz-redhat.in     2009-09-18 19:34:53.000000000 +0200
+++ ../vzctl-3.0.23-pere/etc/init.d/vz-redhat.in        2009-09-18 19:37:17.000000000 +0200
@@ -25,8 +25,10 @@

 # Provides: vz
-# required-start: $network $remote_fs $local_fs sshd
-# required-stop:
+# required-start: $network $remote_fs $syslog
+# required-stop:  $network $remote_fs $syslog
+# Should-Start:  sshd
+# Should-Stop:  sshd
 # Default-Start: 2 3 4 5
 # Default-Stop: 0 1 6
 # Short-Description: OpenVZ startup script

Happy hacking,
Petter Reinholdtsen
Comment 1 Kir Kolyshkin 2009-09-30 05:48:17 EDT

Fixed in git:

Will be available in vzctl >= 3.0.24
Comment 2 Sergey Bronnikov 2015-04-01 14:42:34 EDT
Bug was fixed more than one year ago and there were no complains from reporter after fix. We believe bug fix helped and mark bug as closed.