diff --git a/confluent_osdeploy/common/profile/scripts/autoconsole b/confluent_osdeploy/common/profile/scripts/autoconsole index 421c2e8a..155c4371 100644 --- a/confluent_osdeploy/common/profile/scripts/autoconsole +++ b/confluent_osdeploy/common/profile/scripts/autoconsole @@ -10,11 +10,13 @@ # serial port is not reporting DCD, then it doesn't look like a comfortable enough scenario import fcntl +import glob import os import os.path import struct import subprocess import termios +import platform addrtoname = { @@ -74,9 +76,8 @@ def fixup_ubuntu_grub_serial(): grubout.write(grubline + '\n') subprocess.check_call(['update-grub']) -def get_serial_config(): - if not os.path.exists('/sys/firmware/efi'): - return None + +def get_spcr_config(): if not os.path.exists('/sys/firmware/acpi/tables/SPCR'): return None spcr = open("/sys/firmware/acpi/tables/SPCR", "rb") @@ -99,14 +100,39 @@ def get_serial_config(): currattr = termios.tcgetattr(ttyf) currattr[4:6] = [0, termiobaud[retval['speed']]] termios.tcsetattr(ttyf, termios.TCSANOW, currattr) - retval['connected'] = bool(struct.unpack('