Re: util-vserver debian build warnings util-vserver 0.30.216-pre3004

Corey Wright <[email protected]>
Newsgroups gmane.linux.vserver
Message-ID <[email protected]>
On Wed, 28 Dec 2011 22:46:08 +0100
Ghislain <[email protected]> wrote:

> at install time i got this error:
> 
> 
> Setting up util-vserver-sysv (0.30.216-pre3004-1) ...
> update-rc.d: using dependency based boot sequencing
> insserv: Service vprocunhide has to be enabled to start service 
> vservers-default
> insserv: Service util-vserver has to be enabled to start service 
> vservers-default
> insserv: exiting now!
> update-rc.d: error: insserv rejected the script header
> update-rc.d: using dependency based boot sequencing
> update-rc.d: using dependency based boot sequencing
> 
> 
>    it seems the rc.d scripts do not have the new sysv tags.

i'm not sure what you mean by "new sysv tags".

my investigation suggests that the init scripts are enabled (ie update-rc.d)
in the "wrong" order.  the postinst has vservers-default enabled first, but
its "Required-Start" specifies vprocunhide and util-vserver which haven't
been enabled yet and that's what generates the error (ie enabling a script
which has stated dependencies on other scripts which aren't [yet] enabled).

by default it's probably best to enable the init scripts in the order they
are expected to execute on boot-up (ie util-vserver=10, vprocunhide=26, &
vservers-default=98, because we expect general dependencies to be captured in
the boot-up order, at least implicitly) and that's what the attached patch
does.  eventually update-rc.d can be replaced with insserv (which is what
update-rc.d does under the hood for dependency-based boot installations), but
probably not until lenny "expires" (security support lapses in feb) and that
still won't solve the enabling ordering problem (just simplify the command
arguments).

i probably encountered this when i first started using daniel's source
package months ago, but worked around it (ie run update-rc.d vservers-default
after package installation) for expediency without ever diagnosing the
root cause, and have forgotten about it since because it doesn't happen on
upgrades (which is all i've done for months now).

> Regards,
> Ghislain.

corey
--
[email protected]
postinst-update-rc.d-order.patch (text/x-diff, 754 B)
diff -urNpd util-vserver-0.30.216-pre3004.orig/debian/util-vserver-sysv.postinst util-vserver-0.30.216-pre3004/debian/util-vserver-sysv.postinst
--- util-vserver-0.30.216-pre3004.orig/debian/util-vserver-sysv.postinst	2011-11-29 15:34:54.000000000 -0600
+++ util-vserver-0.30.216-pre3004/debian/util-vserver-sysv.postinst	2011-12-28 23:37:15.000000000 -0600
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 if test "$1" = configure; then
-    update-rc.d vservers-default start 98 2 3 4 5 . stop 02 0 1 6 .
-    update-rc.d vprocunhide start 26 2 3 4 5 . stop 74 0 1 6 .
     update-rc.d util-vserver start 10 2 3 4 5 . stop 90 0 1 6 .
+    update-rc.d vprocunhide start 26 2 3 4 5 . stop 74 0 1 6 .
+    update-rc.d vservers-default start 98 2 3 4 5 . stop 02 0 1 6 .
 fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.