From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- .../recipes-core/sysvinit/sysvinit-inittab/start_getty | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'external/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty') diff --git a/external/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/external/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty index e15ae35f..96fd6cfc 100644 --- a/external/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty +++ b/external/poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty @@ -13,6 +13,18 @@ active_serial=$(grep "serial" /proc/tty/drivers | cut -d/ -f1 | sed "s/ *$//") # Rephrase input parameter from ttyS target index (ttyS1, ttyS2, ttyAMA0, etc). runtime_tty=$(echo $2 | grep -oh '[0-9]') +# busybox' getty does this itself, util-linux' agetty needs extra help +getty="/sbin/getty" +case $(readlink -f "${getty}") in + */busybox*) + ;; + *) + if [ -x "/usr/bin/setsid" ] ; then + setsid="/usr/bin/setsid" + fi + ;; +esac + # Backup $IFS. DEFAULT_IFS=$IFS # Customize Internal Field Separator. @@ -31,7 +43,7 @@ for line in $active_serial; do then if [ -c /dev/$2 ] then - /sbin/getty -L $1 $2 $3 + ${setsid:-} ${getty} -L $1 $2 $3 fi break fi -- cgit 1.2.3-korg