mirror of
https://github.com/leitbogioro/Tools.git
synced 2025-09-18 04:14:52 +08:00
Update ubuntuInit.sh
This commit is contained in:
parent
f290099ea3
commit
79359d9dea
1 changed files with 8 additions and 1 deletions
|
@ -2,7 +2,14 @@
|
|||
#
|
||||
# Alpine Linux use "ash" as the default shell.
|
||||
|
||||
exec >/dev/tty0 2>&1
|
||||
# Find available tty.
|
||||
for ttyItems in "/dev/tty0" "/dev/ttyS0" "/dev/ttyAMA0"; do
|
||||
ttyAttribute=$(stty -F "$ttyItems")
|
||||
[[ -n "$ttyAttribute" && -n $(echo "$ttyAttribute" | grep -io "\-brkint ixoff \-imaxbel") ]] && {
|
||||
break
|
||||
}
|
||||
done
|
||||
exec >"$ttyItems" 2>&1
|
||||
|
||||
# Delete the initial script itself to prevent to be executed in the new system.
|
||||
rm -f /etc/local.d/ubuntuConf.start
|
||||
|
|
Loading…
Add table
Reference in a new issue