Hi

On Mon, Jul 22, 2013 at 2:21 PM, Tom Gundersen <[email protected]> wrote:
> ---
>  docs/[email protected] | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/docs/[email protected] b/docs/[email protected]
> index 7b64823..f1084b4 100644
> --- a/docs/[email protected]
> +++ b/docs/[email protected]
> @@ -4,10 +4,7 @@
>  # spawns KMSCON on this VT. Note that this does automatically limit KMSCON to
>  # seat0. You cannot spawn KMSCON on other seats with this unit.
>  #
> -# You can replace the default [email protected] that is shipped with systemd by
> -# linking it with:
> -#   ln -s /usr/lib/systemd/system/[email protected] 
> /etc/systemd/system/[email protected]
> -# This will make systemd start KMSCON instead of agetty on each VT. Or more
> +# When enabled, systemd will start KMSCON instead of agetty on each VT. Or 
> more
>  # precisely, this will make systemd-logind use [email protected] instead of
>  # [email protected] for new VTs. In fact, all other units/scripts/... that use
>  # [email protected] will not be affected by this change.
> @@ -45,4 +42,5 @@ TTYVHangup=yes
>  TTYVTDisallocate=yes
>
>  [Install]
> [email protected]

That was already reported on github. The thing is, "systemctl disable"
doesn't honor "Alias" lines. So if I add this alias and a user does
"systemctl enable [email protected]", a following "systemctl disable
kmscon@<whatever>" doesn't remove this alias again.

This gets worse if a user enables "[email protected]" as kmscon will
then run on all VTs unless a user removes the symlink manually.

To fix this, we need to adjust systemd: src/shared/install.c:
See unit_file_enable() and unit_file_disable(). *_enable() calls
install_context_apply() -> install_info_apply(), which add all
symlinks for aliases, wants, requires, ... However, *_disable() calls
install_context_mark_for_removal() which only removes the main
unit-file symlink.
While I am not sure about why *_disable() doesn't remove these, I
think we can at least remove "Alias" lines during *_disable().

Anyhow, I want to get this resolved in systemd before applying this
patch. Gettys are a crucial part and kmscon didn't get widespread
testing, yet. If howtos tell users to use "ln -s ...kmsconvt...
...autovt...", it should be obvious for the user to run "rm
...autovt..." to revert it. But if a howto tells them to run
"systemctl enable", it isn't really obvious that a "rm ...autovt..."
is needed. And users tend to run whatever a howto tells them to.. I'd
like to avoid getting angry bugreports for that.

Btw., I intend to work on that in Brno.

Cheers
David

>  WantedBy=getty.target
> --
> 1.8.3.3
>
> _______________________________________________
> kmscon-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/kmscon-devel
_______________________________________________
kmscon-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/kmscon-devel

Reply via email to