Re: Links in /etc/rc*.d should be treated as configuration files?
Luigi Gangitano <email@example.com> writes:
> I've noticed that some packages (xprint and postgres to name a few),
> install new links in /etc/rc*.d on upgrade even if those links were
> removed by the administrator via update-rc.d.
> Usually those package restart the service during upgrade even if it
> wasn't running.
Looking at /var/lib/dpkg/postgresql.postinst on this machine, it has
update-rc.d postgresql defaults >/dev/null
invoke-rc.d --disclose-deny postgresql restart >$TMPFILE 2>&1
Yes, the update-rc.d invocation will create new links, but only if the
user has deleted *all* of the symlinks in /etc/rc?.d. This is
documented in update-rc.d(8), and the canonical advice for having a
service around that you don't actually want to run is to leave the
stop links in /etc/rc0.d and rc6.d. invoke-rc.d, if I understand it
correctly, should only start the service if it would normally be
started in this runlevel.
In other words, "we already do this."
David Maze firstname.lastname@example.org http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell