On Thu, 2005-09-08 at 03:33 -0700, Joshua Rodman wrote:
> However, after xprint has already been installed, and after I have shut
> down the process, and after I have edited the launch symlinks so that it
> should not be started:
> 
> Xprint still starts itself on upgrade, or on attempted package
> reconfiguration.
> 
>  - There is a general facility for this and I'm too stupid to see it.

Yes, there is a general facility for it, but it's vapourware, so no,
you're not too stupid to see it

>  - There is a general facility for this and some packages (including
>    xprint) are not using it.

The general facility which packages should be using is invoke-rc.d
(which is not vapourware, and Xprint is using it.  So as you say, the
problem is not Xprint's, it's Debian's in general).


The situation (after reading more closely the man page for invoke-rc.d,
which refers to /usr/sbin/policy-rc.d, conferring with other developers
at #debian, and checking what rcconf, sysv-rc-conf,file-rc actually
provide) it the following.

Daemon packages during upgrade or reconfigure are supposed to invoke
their init script indirectly, by invoking invoke-rc.d.  This is what
Xprint does in its postinst script: "invoke-rc.d xprint restart".

The man page for invoke-rc.d says that execution of the operation may be
controlled by /usr/sbin/policy-rc.d, if it exists.  See "INIT SCRIPT
POLICY". So "invoke-rc.d xprint restart"  may be prevented from actually
running "/etc/init.d/xprint restart".

However, policy-rc.d does not normally exist. The prevailing attitude
around Debian is that if you installed a daemon, then you must want it
running.  So the only thing that exists is the specification of what a
policy-rc.d script must be able to do,
in /usr/share/doc/sysv-rc/README.policy-rc.d.gz .

The specification of policy-rc.d exists, but no one has ever bothered to
actually go and implement it.

Vapourware, in other words. Sad but true. [1]

So all you can do is this:

1) set up the rc symlinks to your taste (use the helper packages
mentioned in this bug if you like).  This will prevent the daemon being
started automatically at boot.

2) run "/etc/init.d/xprint stop" each time after upgrading. Sorry, this
is the sad bit, the bit that policy-rc.d is supposed to control.

I will therefore leave this bug open as a beacon to all those poor
sojourners through the night who want services ready at hand, but only
to provide those service at their master's command.

Sorry about the disappointing news :(

Drew

[1] of course, this is Free Software, where no such thing as Vapourware
can exist.  No one has bothered to do it yet, but if you, gentle reader,
should make it your Life's Work to create an implementation of the
mythical /usr/sbin/policy-rc.d, then all our lives will become forever
richer...


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to