On Sun, 2005-01-30 at 12:05 +0800, Dan Jacobson wrote:
> Drew> Dan, the command you want is "update-rc.d xprint remove".  This will
> Drew> prevent Xprt from being started up at boot.
> But then it won't get stopped at shutdown if I started it by hand one day.
> 
> OK, just remove some of the links.  But are these changes recorded
> somewhere as robust as /etc/default/xprint?
> 
> Will they weather a apt-get remove; apt-get install as well as
> /etc/default/xprint?  Or does one need a extra notepad to write down
> what one did?  OK, maybe  sysv-rc-conf has such a recording system,
> but it still isn't integrated with weathering a remove/install probably.
> 

Yes it will be robust, you just have to do it the right way.  I raised
the question elsewhere (bug #292802). The reply was that the change will
be preserved if you leave at least one symlink in the /etc/rc*.d
directories. If this is the case, then update-rc.d does nothing (unless
you force it with -f). This is documented in the update-rc.d manpage.

For instance, runlevel 0 is used to halt the system, so it's a good
candidate for the one to be kept (it will make sure Xprint, if it's
running, will be shutdown cleanly).

So you might run something like "rm /etc/rc[1-6].d/*xprint*" to remove
everything except /etc/rc0.d/K20xprint.  The helper tools that Anthony
mentioned will no doubt do this job with more care, with the facility to
backup to a previous state.

If you want to restore back to normal behaviour, you first delete the
remaining last symlink:
        update-rc.d -f xprint remove
then restore the default symlinks:
        update-rc.d xprint defaults

I tested this, it works. Your last remaining /etc/rc0.d/K20xprint is
preserved when xprt-common is upgraded or removed.  

The only catch is that Xprt will be started on upgrade, because the
upgrade script invokes /etc/init.d/xprint directly.  You'd need to stop
it manually. But it won't be started at boot any longer.

Drew



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

Reply via email to