systemd: Is it wrong?
awilliam at redhat.com
Tue Jul 12 00:29:38 UTC 2011
On Mon, 2011-07-11 at 13:34 -0400, Steve Dickson wrote:
> On 07/11/2011 04:42 AM, Michal Schmidt wrote:
> > On Sun, 10 Jul 2011 20:49:56 -0400 Steve Dickson wrote:
> >> Ok.. Now understand where my confusion is... Currently when one
> >> want to start the nfs server they type 'service nfs start' which
> >> calls a number of binaries and ultimately a system daemon.
> > We could achieve something similar with systemd by providing a target
> > unit 'nfs.target'. The unit would pull the daemons using requirement
> > dependencies.
> >> Now if they enable want secure nfs, they edit a file in /etc/systconf
> >> and simply type 'service nfs restart' which again runs a number
> >> of binaries and start a couple of system daemons.
> > This could be another target 'nfs-secure.target'. It would pull
> > 'nfs.target' + more daemons.
> > The users would start and enable these target units instead of
> > the units of the individual daemons.
> This definitely sounds promising... When you have some code to
> play around please let me know... I'm more than willing to help
There's no 'code' involved, really, targets are a feature of systemd and
you create them much like services. Take a look
and /lib/systemd/system/graphical.target.wants , for instance. All you
need is a definition for the target and the .wants subdirectory
containing symlinks to the services included in (in systemd terminology,
'wanted by') the target.
So if, in converting NFS to systemd, we wound up with five services
which all need to be run to start up NFS completely:
you'd just have a /lib/systemd/system/nfs.target with the normal boring
and a /lib/systemd/system/nfs.target.wants/ directory containing
and Bob would be your uncle. More or less. I just did all that on the
back of an envelope and it's probably wrong somewhere. But you get the
Fedora QA Community Monkey
More information about the devel