Skip to content

Commit

Permalink
init: add check for s390x consoles
Browse files Browse the repository at this point in the history
  • Loading branch information
tuan-hoang1 committed Jun 6, 2019
1 parent eea062f commit 48c91ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions initramfs-init.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ rc_add() {

# Recursively resolve tty aliases like console or tty0
list_console_devices() {
[ "$1" = "ttyS0" ] && [ -e /sys/class/tty/sclp_line0 ] && return

if ! [ -e /sys/class/tty/$1/active ]; then
echo $1
return
Expand All @@ -101,6 +103,10 @@ list_console_devices() {
for dev in $(cat /sys/class/tty/$1/active); do
list_console_devices $dev
done

for _tty in hvc0 xvc0 hvsi0 sclp_line0 ttysclp0 "3270!tty1"; do
[ -e /sys/class/tty/$_tty ] && echo $_tty
done
}

setup_inittab_console(){
Expand Down

0 comments on commit 48c91ba

Please sign in to comment.