[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

I have a beef with policy 3.3.3



It says this:

The system administrator will have the opportunity to customize runlevels
by either running update-rc.d, by simply adding, moving, or removing the
symbolic links in /etc/rcn.d if symbolic links are being used, or by
modifying /etc/runlevel.conf if the file-rc method is being used.

It also says this:

To get the default behavior for your package, put in your postinst script

update-rc.d package defaults >/dev/null

But there is a problem with this advice:

apocalypse:/home/branden# update-rc.d -f xdm remove
update-rc.d: /etc/init.d/xdm exists during rc.d purge (continuing)
 Removing any system startup links for /etc/init.d/xdm ...
   /etc/rc0.d/K01xdm
   /etc/rc1.d/K01xdm
   /etc/rc2.d/S99xdm
   /etc/rc3.d/S99xdm
   /etc/rc4.d/S99xdm
   /etc/rc5.d/S99xdm
   /etc/rc6.d/K01xdm
apocalypse:/home/branden# update-rc.d xdm defaults 99 01
 Adding system startup for /etc/init.d/xdm ...
   /etc/rc0.d/K01xdm -> ../init.d/xdm
   /etc/rc1.d/K01xdm -> ../init.d/xdm
   /etc/rc6.d/K01xdm -> ../init.d/xdm
   /etc/rc2.d/S99xdm -> ../init.d/xdm
   /etc/rc3.d/S99xdm -> ../init.d/xdm
   /etc/rc4.d/S99xdm -> ../init.d/xdm
   /etc/rc5.d/S99xdm -> ../init.d/xdm

You can see that the second command is exactly what will happen the next
time xdm is upgraded.

update-rc.d has no way of knowing if the symlinks in the rc directories
aren't there because the local admin removed them, or because the package
was just installed.  A postinst script cannot distinguish between an
initial install and an upgrade, therefore you can't add some kind of
conditional around the update-rc.d call in the postinst.

I suggest that update-rc.d and/or policy be modified.

-- 
G. Branden Robinson            |     If a man ate a pound of pasta and a
Debian GNU/Linux               |     pound of antipasto, would they cancel
branden@ecn.purdue.edu         |     out, leaving him still hungry?
roger.ecn.purdue.edu/~branden/ |     -- Scott Adams

Attachment: pgpJyB2yhSBmY.pgp
Description: PGP signature


Reply to: