On Wed, Feb 18, 2015 at 10:12 PM, James <wirel...@tampabay.rr.com> wrote: > > Ok > > So I'm reading about systemd support in ebuilds; just trying to > understand the beast wee bit better. > > In in this ebuild: www-misc/monitorix (A lightweight system monitoring tool)f > > the newest version has added this line to the ebuild: > > "systemd_dounit docs/${PN}.service" > > > Looking that the systemd.eclass, all I see is: > "systemd_dounit <unit>... > Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4 and > non-fatal in earlier EAPIs. " > > Which seems reasonable, but tells me nothing what the line does. I can > speculate that monitorix becomes a registered process, if you are > running systemd, but is otherwise ignored on a openrc based system?
It just installs the file in the place where systemd reads its unit files: /usr/lib/systemd/system. There was a time when the Gentoo devs where still debating if it should be /usr/lib/systemd/system or /lib/systemd/system; having an ebuild function doing the install helped to avoid checking which one to use, and to be consistent. So, in short: "systemd_dounit <units>" just puts the "<units>" in /usr/lib/systemd/system. There is no "registration"; systemd will read the unit the next time the machine boots or earlier if you do "systemctl daemon-reload", but the service will not be started nor enabled until the user specifies (that's the Gentoo policy, I believe). > It would seem to me the devmanual needs some more "prose" so on can > discern what the systemd.eclass is doing. And yea, I'm off to look > at the code for systemd.eclass as I'm sure it's clear as mud..... It's actually quite short and clear. > The trouble is I find this code everywhere with google. So where > is the best place to read the current systemd.eclass code and where > do I look at the 9999 stuffage; ?should? I become curious about that > eclass or other eclass codes.....? http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/systemd.eclass?view=markup or locally: /usr/portage/eclass/systemd.eclass I don't understand what the 9999 has to do with the eclass. > guidance and insight is appreciated. Since all of systemd's configuration is really short text files and symlinks to them, the eclass is really simple. Less than a couple dozen functions, most of them involved with installing text files (unit files, tmpfiles.d files, etc.), and some with maintenance of the journal. Regards. -- Canek Peláez Valdés Profesor de asignatura, Facultad de Ciencias Universidad Nacional Autónoma de México