[Pkg-sysvinit-devel] Bug#648433: Handling of non-conffiles
Petter Reinholdtsen
pere at hungry.com
Sun Jan 29 20:44:11 UTC 2012
[Roger Leigh]
> While the bug was originally filed as only wishlist, this does solve
> a rather more important issue: any change to the defaults would
> never take effect on upgrade; it would require a fresh install,
> because it's only set once on initial install.
Note that this behaviour of not changing behaviour of the boot
settings on upgrades were by design, not by accident. Existing
settings were not intended to change after the system were installed.
> With the changes to e.g. RAM* for the /run transition, this
> introduces a rather large discrepancy between wheezy upgrades and
> new installs, which using ucf solves. I originally wrote this using
> sha256 hashes of all previous conffiles and implementing ucf-like
> behaviour directly in the maintainer script, but it was (rightly)
> suggested that reimplementing ucf was suboptimal, and that I should
> be using ucf directly.
>
> Another alternative would be to make /etc/default/rcS a conffile.
> The only niggle is that this file is modified by the installer,
> which is not ideal. However, this would make the use of ucf
> redundant, if we can find a way to make this possible.
Actually, I believe you are trying to solve the wrong problem with
both the ucf approach and your idea of turning /etc/default/rcS into a
conffile.
If changes to the default setup should affect existing installations
after upgrades, drop /etc/default/rcS and use code like this instead
of only loading /etc/default/rcS:
. /lib/init/default-rcS
if [ -e /etc/default/rcS ] ; then . /etc/default/rcS ; fi
This one the defaults get from a file not considered system
configuration, and all (and only) local overrides are fetched from
/etc/default/rcS.
--
Happy hacking
Petter Reinholdtsen
More information about the Pkg-sysvinit-devel
mailing list