'Twas brillig, and Guillaume Rousse at 14/06/12 08:30 did gyre and gimble: > Le 14/06/2012 00:30, Olivier Blin a écrit : >> JA Magallón <[email protected]> writes: >> >>> On 06/12/2012 02:29 AM, JA Magallón wrote: >>>> On 06/11/2012 10:22 PM, guillomovitch wrote: >>>>> Name : nfs-utils Relocations: (not >>>>> relocatable) >>>>> Version : 1.2.6 Vendor: Mageia.Org >>>>> Release : 2.mga3 Build Date: Mon Jun 11 >>>>> 22:21:14 2012 >> >> [...] >> >>>> Some weird things happen with this and systemd... >>>> I had nfs server active. After update and reboot, I had no nfs server >>>> running. >>>> What do I have to add in systemd to get them working ? >> >> It seems the service are not enabled automatically at package install. >> Guillaume, is there any reason why you did not add any %_post_service >> scriptlet for all these new systemd units? > Mainly because I still don't understand the exact relationship between > the 8 different services, some of them being apparently alternatives > nfs-secure-server.service vs nfs-server.service), other very specifics > services (nfs-rquotad.service). So, the basic idea of automatically > enabling the service of any installed package, because installing it > usually denote the intent of using it, doesn't match very well here. > Especially since the merge of clients and server packages. > > Also, I have no idea about how to handle the mismatch between the old > sysinit service scripts (one for all clients service, one for all server > services) during the upgrade, for already configured services.
Yeah, I'm not sure how best to handle this either, but I'd suspect most of the NFS related servers would be bound together by a target of some sort (nfs-server.target?) I've not looked but that would be my guess as to how it would work. Then each of the required parts of an nfs-server can have .wants links shipped in the package (e.g. /lib/systemd/system/nfs-server.target.wants/nfs-rquotad.service). Of course if these sub-components are optional pats of an "nfs server", then they shouldn't have symlinks shipped in the package. The ones we want to "enable by default" should be enabled in a %post script when the package is installed *for the first time* and by a %triggerun of the version that they were removed to handle upgrades (see systemd package for example of this). As these sub components should all have their install section with: [Install] WantedBy=nfs-server.target All you should need to do to migrate sysvinit to systemd is to look for the enabled sysvinit scripts and enable the nfs-server.target (the target unit itself should contain an install section that means it's WantedBy=multi-user.target. But I've not really looked at the Fedora units or our nfs package since these updates so take the above as a general comment only :) Cheers Col -- Colin Guthrie colin(at)mageia.org http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/
