[systemd-devel] (newbie) question: dependency on ldap/kerberos
josh at gebaschtel.ch
Wed Jun 15 12:42:09 PDT 2011
I think I understand the .target and .wants in the meanwhile, so I gave up with trying achieving the exact same as before :)
I see the advantage of systemd. What I basically want is to make samba dependent on my own 'check-ad-avail.target', which depends on network.
What I failed yet is to actually assemble what I've been used with /etc/init.d/myrcscript [start|stop|status] into a .target, but that'll take another weekend of trial'n'error with VirtualBox and some custom RC scripts, and getting a bit used to systemd.
Do you have a good page translating "how in RH/SuSE/Ubuntu/SUN/AIX/..., so in systemd "? howto for unix operators?
Cheers & thx
Btw: because of better cached-credentials support in pam and nscd on F15, the whole situation eases a bit anyway :)
Von: Lennart Poettering [mailto:lennart at poettering.net]
Gesendet: Mittwoch, 15. Juni 2011 20:23
An: Josh Geisser
Cc: systemd-devel at lists.freedesktop.org
Betreff: Re: [systemd-devel] (newbie) question: dependency on ldap/kerberos
On Sun, 05.06.11 03:30, Josh Geisser (josh at gebaschtel.ch) wrote:
> Equals: on boot, start the virtual domain controller, then either wait for this one to become available, or if any other is reachable also good :)
> (Despite an abuse of infrastructure, this actually works quite well, the on-site used severs serving SMB are in either 2min or 15minutes available, regardless of whether the firewall could establish the VPN's)
> Any hint how I can implement this scenario with systemd?
The equivalent of runlevels in systemd is targets. You may have as many
of them as you wish and label them freely. Simply create a file
/etc/systemd/system/foobar.target and write data like the following into it:
Description=My Pretty Little Foobar Target
And there you have a new target just for yourself. And then you can pull
in other stuff into it, with symlinks in a .wants subdir.
# mkdir -p /etc/systemd/system/foobar.target.wants/
# ln -sf /lib/systemd/system/httpd.service /etc/systemd/system/foobar.target.wants/
And this new target will then pull in httpd. (don't forget to reload the
systemd config with "systemctl daemon-reload".)
You can easily define supersets of other targets with this. For example,
add in everything that is already in multi-user.target:
# ln -sf /lib/systemd/system/multi-user.traget /etc/systemd/system/foobar.target.wants/
You have a lot of flexibility with this.
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel