'Twas brillig, and Seblu at 10/05/12 22:27 did gyre and gimble:
> Hello,
> 
> on my archlinux test computer i would have first console not cleaned
> and other spawned statically (crazy idea isn't it).
> 
> So I've turned NAutoVTs to 1 in /etc/systemd/systemd-logind.conf.
> I've copied /usr/lib/systemd/system/[email protected] into
> /etc/systemd/system/ and patched as following:
> 
> --- /usr/lib/systemd/system/[email protected]      2012-05-03
> 04:37:09.000000000 +0200
> +++ /etc/systemd/system/[email protected]  2012-04-16 01:11:52.046979314 +0200
> @@ -18,14 +18,14 @@
> 
>  [Service]
>  Environment=TERM=linux
> -ExecStart=-/sbin/agetty %I 38400
> +ExecStart=-/sbin/agetty --noclear %I 38400
>  Restart=always
>  RestartSec=0
>  UtmpIdentifier=%I
>  TTYPath=/dev/%I
> -TTYReset=yes
> -TTYVHangup=yes
> -TTYVTDisallocate=yes
> +TTYReset=no
> +TTYVHangup=no
> +TTYVTDisallocate=no
>  KillMode=process
>  IgnoreSIGPIPE=no
> 
> After this i've symlink all my gettys in
> /etc/systemd/system/getty.target.wants
> # cd /etc/systemd/system/getty.target.wants
> # ls -l
> total 0
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> lrwxrwxrwx 1 root root 17 2012-03-12 22:40 [email protected] ->
> ../[email protected]
> 
> My issue is at every systemd package upgrade, [email protected] is
> replaced by a new one linked to
> /usr/lib/systemd/system/[email protected].
> And i loose my configuration.

This thread went a little tangential, so I'd like to bring it back to
the "problem" stated here.

Firstly, that was not my understanding of how things are supposed to
work, but perhaps Lennart or Kay can clarify.

I thought that the actual end point of the symlink was not all that
important...

e.g. if I have:

/usr/lib/systemd/system/[email protected]
/etc/lib/systemd/system/[email protected]
/etc/lib/systemd/system/multi-user.target.wants/[email protected] ->
/usr/lib/systemd/system/[email protected]

I thought that the unit file /etc/lib/systemd/system/[email protected] was
still the one used. i.e. the symlink is merely indicative of whether the
service is enabled or not, and the actual physical file that it points
to is not relevant.

i.e. The .wants symlink only really states "I'm enabled as an instance
of [email protected]" and then the normal inheritance rules of
[email protected] resolution apply *after* that, i.e. [email protected] in
/etc/... overrides the one in /lib/...

This is maybe not intuitive when looking solely at the symlinks
themselves, but it is when you think about what they represent.

I've not actually poked at the code or tried this out, but that's always
been my understanding.

If this is the case, it shouldn't matter that your [email protected] is
linked to the "wrong" unit file and your config should be preserved.



If I'm wrong here (entirely possible) perhaps Lennart or Kay could
explain why this is useful behaviour to allow the wants symlinks'
destination file to take precedence over the administrators own units?


Cheers

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/

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to