[systemd-devel] [PATCH] units: Make getty at .service install rule generic.
gmane at colin.guthr.ie
Wed Feb 13 02:45:17 PST 2013
'Twas brillig, and Thomas Bächler at 13/02/13 10:01 did gyre and gimble:
> Am 13.02.2013 10:29, schrieb Colin Guthrie:
>>> Hmm, but what happens then if people do run
>>> systemctl enable getty at .service?
> In my eyes, doing this always seemed wrong, I wouldn't mind if it
> returned an error.
Yeah, I'm personally OK with that too.
>>> We really need to get the story right on this, I guess, so that
>>> something useful happens in both cases?
>> The same could be said of any templated unit with a WantedBy= section I
>> One idea off the top of my head is to have a NoInstanceAlias= directive,
>> but adding a new verb here seems fugly.
> I actually like the idea of adding a DefaultInstace= option to the
> install section. Instead of fiddling with aliases manually, it could
> look like this:
Actually yeah, that looks kinda neat. I think that syntax would justify
a new verb.
> Instead of going to [Install], this could even go to [Unit] and affect
> start/stop, not just enable.
Interesting idea. Might be somewhat confusing overall however. I guess
there is an argument for being explicit for start/stops, even if
enable/disable support the "instanceless" syntax.
>> Perhaps we could abuse the - syntax?
>> Alias=-getty.target.wants/getty at tty1.service
> Manually writing an alias here seems redundant - you shouldn't have to
> write an alias when what you do is pretty much standard.
If DefaultInstance was implemented in the [Unit] section, I guess Alias
should gain %i/%I replacement support just to be complete. With it
bailing with an error when DefaultInstance was not supplied and no
instance provided on the command line.
Tribalogic Limited http://www.tribalogic.net/
Mageia Contributor http://www.mageia.org/
PulseAudio Hacker http://www.pulseaudio.org/
Trac Hacker http://trac.edgewall.org/
More information about the systemd-devel