Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] sysvinit-inittab: Make sure new shell from start_getty gets a controlling tty
@ 2016-12-27  6:47 Yong, Jonathan
  2017-01-06  8:05 ` Yong, Jonathan
  0 siblings, 1 reply; 2+ messages in thread
From: Yong, Jonathan @ 2016-12-27  6:47 UTC (permalink / raw)
  To: openembedded-core; +Cc: kim.tatt.chuah

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: sysvinit-inittab: Make sure new shell from start_getty gets a controlling tty
  2016-12-27  6:47 [PATCH] sysvinit-inittab: Make sure new shell from start_getty gets a controlling tty Yong, Jonathan
@ 2017-01-06  8:05 ` Yong, Jonathan
  0 siblings, 0 replies; 2+ messages in thread
From: Yong, Jonathan @ 2017-01-06  8:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: kim.tatt.chuah

On 12/27/2016 14:47, Yong, Jonathan wrote:
> 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
> 

Ping?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-06  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-27  6:47 [PATCH] sysvinit-inittab: Make sure new shell from start_getty gets a controlling tty Yong, Jonathan
2017-01-06  8:05 ` Yong, Jonathan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox