diff --git a/Linux_reinstall/Alpine/alpineInit.sh b/Linux_reinstall/Alpine/alpineInit.sh index ea35bb9..12a30ff 100644 --- a/Linux_reinstall/Alpine/alpineInit.sh +++ b/Linux_reinstall/Alpine/alpineInit.sh @@ -2,6 +2,8 @@ # # Alpine Linux use "ash" as the default shell. +exec >/dev/tty0 2>&1 + insertIntoFile() { file=$1 location=$2 @@ -25,16 +27,6 @@ rm -f /etc/runlevels/default/local apk update apk add bash coreutils grep sed -# Find available temporary tty. -# Parameters of outputs of "stty": https://www.ibm.com/docs/en/aix/7.3?topic=s-stty-command -for ttyItems in "/dev/tty0" "/dev/ttyS0" "/dev/ttyAMA0"; do - ttyAttribute=$(stty -F "$ttyItems") - if [[ -n "$ttyAttribute" ]]; then - exec >"$ttyItems" 2>&1 - break - fi -done - # Get Alpine Linux configurations. confFile="/root/alpine.config"