On 22 January 2015 at 14:46, Michael Biebl <[email protected]> wrote: > 2015-01-22 15:08 GMT+01:00 Dimitri John Ledkov <[email protected]>: >> At the moment, I'm looking at packaging symlinks in .wants directories >> under /usr and then allow to uninstall such a package as a means to >> override the default config. Since I would like to update how the >> default config is setup, without doing in /etc where I'd have to >> answer "is this my old config, or user modified it and I shouldn't >> touch it" > > That's indeed a tough problem. The upstream recommendation is, to run > "systemctl preset" during the initial installation. > If there are changes to the default in the unit files, those changes > are *not* applied on package upgrades. >
Presets are good, however they do not have a format to specify extra .wants and .requires. And in my case unwants and unrequires. So at the moment I'm playing around with - unconditionally running preset on my preset file, and directing users to write (override) own preset file in /etc/systemd/system-preset if they want to modify the default proposed integration. > I don't think that's a particularly compelling solution. > > In Debian, we introduced a helper called i-s-h [1], which keeps some > additional state and tries to apply such changes on updates. > Well, if "systemctl enable/disable/add-requires/add-wants" would write things into /etc/systemd/system-preset instead of modifying things in /etc, then it would be alright. As essentially the full set of presets would be the state of system-defaults + user overrides. Also it seems like preset is a bit of templating hack at the moment, as they are not loaded by systemd but rarther are simply used to generate files/symlinks on disk under /etc. -- Regards, Dimitri. Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
