Skip to content

Commit

Permalink
change logic to handle arm machines better
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrokethecloud authored and bk201 committed Jun 27, 2024
1 parent 81d5c36 commit 8ed87a5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions package/harvester-os/files/usr/bin/setup-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,17 @@ echo "Remove the serial-getty service..."
rm -rf "/etc/systemd/system/serial-getty*"

# reverse the ttys to start from the last one
for TTY in $(cat /sys/class/tty/console/active); do
read -r -a tty_list < /sys/class/tty/console/active

for TTY in "${tty_list[@]}"; do
tty_num=${TTY#tty}

#for arm64 the terminals are named /dev/ttyAMA*
#skip /dev/ttyAMA* if an additional tty is present
#on equinix metal /dev/ttyAMA is the only terminal available
#so needs to be used as default option
PLATFORM=$(uname -m)
if [ $PLATFORM == "aarch64" ]
if [[ $PLATFORM == "aarch64" && ${#tty_list[@]} > 1 ]]
then
if [[ $tty_num =~ ^AMA[0-9]+$ ]]; then
continue
Expand Down

0 comments on commit 8ed87a5

Please sign in to comment.