[systemd-devel] [PATCH 2/3] install: don't allow to enable/disable templates

Colin Guthrie gmane at colin.guthr.ie
Fri Aug 9 03:22:29 PDT 2013


'Twas brillig, and Colin Guthrie at 09/08/13 12:02 did gyre and gimble:
> 'Twas brillig, and Tom Gundersen at 08/08/13 18:08 did gyre and gimble:
>>
>> On 8 Aug 2013 17:57, "Thomas Bächler" <thomas at archlinux.org
>> <mailto:thomas at archlinux.org>> wrote:
>>>
>>> Am 08.08.2013 15:19, schrieb Michal Sekletar:
>>>> Calling enable on template units doesn't make sense since it is possible
>>>> to enable instances directly and users are not forced to use Alias=
>>>> trickery anymore.
>>>
>>> Actually, it would make sense to do this instead:
>>>
>> http://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg09244.html
>>
>> Yes, we should do this too. But we still need to solve the case when
>> DefaultInstance is not specified.
> 
> I actually ran into a problem the other day related to this.
> 
> I forgot to update my .spec after updating systemd to 206 and because of
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=7aa4fa34f76b0d9b031f0a5ea941c7fa10cebbee
> it caused an interesting problem.
> 
> Doing "systemctl enable getty at .service simply created a getty at .service
> symlink. When this was run at boot, it resulted in systemd trying to
> start getty at getty.target, i.e. the instance name was filled in with the
> unit name.
> 
> Ultimately this lead to agetty failing (as /dev/getty didn't exist) and
> as it has Restart=always in the unit, it kept going and going and going...
> 
> Not the nicest experience.
> 
> Surely if you try and start a template unit without any instance it
> should simply fail rather than default to the unit name?

I see this specific problem is mentioned elsewhere in the thread, so it
can be covered there...

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
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/



More information about the systemd-devel mailing list