summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/sysvinit/sysvinit-inittab/start_getty')
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab/start_getty4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
index 96fd6cfcfd..dfa799adac 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
@@ -11,7 +11,7 @@
11active_serial=$(grep "serial" /proc/tty/drivers | cut -d/ -f1 | sed "s/ *$//") 11active_serial=$(grep "serial" /proc/tty/drivers | cut -d/ -f1 | sed "s/ *$//")
12 12
13# Rephrase input parameter from ttyS target index (ttyS1, ttyS2, ttyAMA0, etc). 13# Rephrase input parameter from ttyS target index (ttyS1, ttyS2, ttyAMA0, etc).
14runtime_tty=$(echo $2 | grep -oh '[0-9]') 14runtime_tty=$(echo $2 | grep -oh '[0-9]\+')
15 15
16# busybox' getty does this itself, util-linux' agetty needs extra help 16# busybox' getty does this itself, util-linux' agetty needs extra help
17getty="/sbin/getty" 17getty="/sbin/getty"
@@ -36,7 +36,7 @@ for line in $active_serial; do
36 then 36 then
37 # Remove all unknown entries and discard the first line (desc). 37 # Remove all unknown entries and discard the first line (desc).
38 activetty=$(grep -v "unknown" "/proc/tty/driver/$line" \ 38 activetty=$(grep -v "unknown" "/proc/tty/driver/$line" \
39 | tail -n +2 | grep -oh "^\s*\S*[0-9]") 39 | tail -n +2 | grep -oh "^\s*\S*[0-9]\+")
40 for active in $activetty; do 40 for active in $activetty; do
41 # If indexes do match then enable the serial console. 41 # If indexes do match then enable the serial console.
42 if [ $active -eq $runtime_tty ] 42 if [ $active -eq $runtime_tty ]