On Tue, Nov 18, 2014 at 5:11 PM, Michael Biebl <mbi...@gmail.com> wrote: > 2014-11-18 14:52 GMT+01:00 Martin Pitt <martin.p...@ubuntu.com>: >> Colin Guthrie [2014-11-18 13:01 +0000]: >>> > * I suppose even wich such a policy the post-installation script >>> > still needs to call some systemd-update-policy-mumble-mumble magic >>> > to actually apply the new policy? >>> >>> Well, the *.policy files are simply read when calling "systemctl preset" >> >> Right. I meant, even with using presets, a newly installed package >> still needs to call "systemd preset foo.service" for all the units >> that it ships, so that the /etc symlinks are generated. I. e. we >> merely replace "enable" (what the current Debian packages do) with >> "preset" in the postinst. >> >> We need to do that as systemd doesn't automagically spot newly >> installed units (via inotify or what not) and enable them. >> >> Or did I misunderstand this? >> >>> The idea is that there are very few policy files shipped in a distro >> >> Indeed. A generic distro should have exactly one, with "disable *" >> (Fedora policy) or "enable *" (Debian policy). Anything more special >> would be customization for specialized images/spins/etc. >> >>> > * With that, how would a package then say that it does *not* want a >>> > particular unit to get enabled? >>> >>> The idea is that you don't really decide that at a package level, but at >>> a distro level. >> >> We do (and that policy drives the auto-generated postinst), but there >> are always special cases where a package might want to ship a unit >> which doesn't get enabled by default. I was wondering how that could >> be accomodated. So for that, the package itself could ship its own >> preset file, containing a "disable myself.service"? That would make >> sense (if I understood it right). Either way, this is certainly the >> rare exception. > > I'm not sure if this preset feature with a single, centrally managed > and distro-provided file > is going to work with 1000+ packages shipping sysv init scripts (or in > the future, systemd .service files). > > We really need the flexibility to decide that on a per package basis.
You already have this flexibility right? You can drop in any number of preset files (even one per package if that makes the most sense). Cheers, Tom _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel