[systemd-devel] [PATCH 04/11] Allow multiple sulogin to be started

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Thu Jun 19 20:51:19 PDT 2014


On Fri, Jun 13, 2014 at 04:41:03PM +0200, Werner Fink wrote:
> From: Frederic Crozat <fcrozat at suse.com>
> 
> Otherwise any agetty on the devices of the system console will
> conflict with sulogin and its input.
> 
> ---
>  units/getty at .service.m4        |    1 +
>  units/rescue.target            |    1 +
>  units/serial-getty at .service.m4 |    1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git units/getty at .service.m4 units/getty at .service.m4
> index aa853b8..7fb2db8 100644
> --- units/getty at .service.m4
> +++ units/getty at .service.m4
> @@ -9,6 +9,7 @@
>  Description=Getty on %I
>  Documentation=man:agetty(8) man:systemd-getty-generator(8)
>  Documentation=http://0pointer.de/blog/projects/serial-console.html
> +Conflicts=rescue.service

systemd has tty arbitration logic. Maybe it is failing in this
case for some reason... rescue.service has StandardInput=tty-force,
which means that when it is started, previous owners of the tty
should be killed. And the other way around, getty@ should wait
until the previous owner goes away on its own. Explicit conflicts
should be unnecessary.

Zbyszek

>  After=systemd-user-sessions.service plymouth-quit-wait.service
>  m4_ifdef(`HAVE_SYSV_COMPAT',
>  After=rc-local.service
> diff --git units/rescue.target units/rescue.target
> index 3f59b14..20f6841 100644
> --- units/rescue.target
> +++ units/rescue.target
> @@ -10,6 +10,7 @@ Description=Rescue Mode
>  Documentation=man:systemd.special(7)
>  Requires=sysinit.target rescue.service
>  After=sysinit.target rescue.service
> +Conflicts=getty.target
>  AllowIsolate=yes
>  
>  [Install]
> diff --git units/serial-getty at .service.m4 units/serial-getty at .service.m4
> index 4ac51e7..4b1ab20 100644
> --- units/serial-getty at .service.m4
> +++ units/serial-getty at .service.m4
> @@ -10,6 +10,7 @@ Description=Serial Getty on %I
>  Documentation=man:agetty(8) man:systemd-getty-generator(8)
>  Documentation=http://0pointer.de/blog/projects/serial-console.html
>  BindsTo=dev-%i.device
> +Conflicts=rescue.service
>  After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
>  m4_ifdef(`HAVE_SYSV_COMPAT',
>  After=rc-local.service
> -- 
> 1.7.9.2
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 


More information about the systemd-devel mailing list