public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dr. Werner Fink" <werner@suse.de>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org, Ruediger Meier <sweet_f_a@gmx.de>
Subject: Re: [PATCH 1/4] Avoid that agetty nor sulogin are fooled by a running plymouth
Date: Tue, 13 May 2014 12:42:22 +0200	[thread overview]
Message-ID: <20140513104222.GA16787@boole.suse.de> (raw)
In-Reply-To: <20140513085658.GM8951@x2.net.home>

[-- Attachment #1: Type: text/plain, Size: 1871 bytes --]

On Tue, May 13, 2014 at 10:56:58AM +0200, Karel Zak wrote:
> On Thu, May 08, 2014 at 12:09:22PM +0200, Werner Fink wrote:
> > The nowadays used plymouth locks the devices used for the system
> > console which causes that agetty as well as sulogin can not modify
> > the termios settings of e.g. the serial devices of the systenm console.
> 
>  All applied, thanks!
> 
> > +	int fd = con->fd, i = (plymouth_command("--ping")) ? 20 : 0;
> > +
> > +	while (i-- > 0) {
> > +		/*
> > +		 * With plymouth the termios flags become changed after this
> > +		 * function had changed the termios.
> > +		 */
> > +		memset(&lock, 0, sizeof(struct termios));
> > +		if (ioctl(fd, TIOCGLCKTRMIOS, &lock) < 0)
> > +			break;
> > +		if (!lock.c_iflag && !lock.c_oflag && !lock.c_cflag && !lock.c_lflag)
> > +			break;
> > +		if (i == 15 && plymouth_command("quit") != 0)
> > +			break;
> > +		sleep(1);
> > +	}
> > +	memset(&lock, 0, sizeof(struct termios));
> > +	ioctl(fd, TIOCSLCKTRMIOS, &lock);
> 
>  I hope 20s sleep is the worst case and in normal situations we don't
>  have to call plymouth "quit" from sulogin/agetty.

Indeed the 20 seconds are the worst case, in normal case this is not hit but
during debugging a few service units I had run into a blocking plymouth, that
is that plymouth hold the terminal termios structure locked and this has
lead to that fact that no password could be specified.

In my experience plymouth has some more further side effects if on is using
a further serial console or if there is no virtual console (s390 and some
x86_64 server systems).  Maybe upstream of plymouth is not aware that in
server business a virtual console used for graphic is not that common.

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-05-13 10:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 10:09 [PATCH 1/4] Avoid that agetty nor sulogin are fooled by a running plymouth Werner Fink
2014-05-08 10:09 ` [PATCH 2/4] Enable sulogin to find a suitable console device even if the first line in /proc/consoles does not have any major and minor number Werner Fink
2014-05-08 10:09 ` [PATCH 3/4] Better support of the special system consoles on S390 Werner Fink
2014-05-08 10:09 ` [PATCH 4/4] Beside virtual consoles support xvc and hvc device lines as well Werner Fink
2014-05-13  8:56 ` [PATCH 1/4] Avoid that agetty nor sulogin are fooled by a running plymouth Karel Zak
2014-05-13 10:42   ` Dr. Werner Fink [this message]
2014-05-13 12:10     ` Ruediger Meier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140513104222.GA16787@boole.suse.de \
    --to=werner@suse.de \
    --cc=kzak@redhat.com \
    --cc=sweet_f_a@gmx.de \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox