All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yong, Jonathan" <jonathan.yong@intel.com>
To: openembedded-core@lists.openembedded.org
Cc: kim.tatt.chuah@intel.com
Subject: [PATCH] sysvinit-inittab: Make sure new shell from start_getty gets a controlling tty
Date: Tue, 27 Dec 2016 06:47:35 +0000	[thread overview]
Message-ID: <20161227064735.6552-1-jonathan.yong@intel.com> (raw)

Without exec, the processes from the new shell do not get a ctty:

	root@intel-corei7-64:~# ps -x | grep getty
	  755 tty1     Ss+    0:00 /sbin/getty 38400 tty1
	  791 ?        Ss     0:00 /bin/sh /bin/start_getty 115200 ttyS0
	  804 ?        S      0:00 grep getty

In particular, the openssh client fails:

	root@intel-corei7-64:~# ssh -v <target>
	<truncated>
	debug1: read_passphrase: can't open /dev/tty: No such device or address
	Host key verification failed.

This patch fixes those errors.

Signed-off-by: Yong, Jonathan <jonathan.yong@intel.com>
---
 meta/recipes-core/sysvinit/sysvinit-inittab/start_getty | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
index e3d052a..ab238f6 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
@@ -1,5 +1,5 @@
 #!/bin/sh
 if [ -c /dev/$2 ]
 then 
-	/sbin/getty -L $1 $2 $3
+	exec /sbin/getty -L $1 $2 $3
 fi
-- 
2.10.2



             reply	other threads:[~2016-12-27  6:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27  6:47 Yong, Jonathan [this message]
2017-01-06  8:05 ` sysvinit-inittab: Make sure new shell from start_getty gets a controlling tty Yong, Jonathan

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=20161227064735.6552-1-jonathan.yong@intel.com \
    --to=jonathan.yong@intel.com \
    --cc=kim.tatt.chuah@intel.com \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.