mirror of
https://github.com/leitbogioro/Tools.git
synced 2024-11-14 21:24:32 +08:00
Update alpineInit.sh
This commit is contained in:
parent
ffee8b3801
commit
96e2762ed3
1 changed files with 10 additions and 10 deletions
|
@ -2,16 +2,6 @@
|
|||
#
|
||||
# Alpine Linux use "ash" as the default shell.
|
||||
|
||||
# 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")
|
||||
[[ -n "$ttyAttribute" && -n $(echo "$ttyAttribute" | grep -o 'ixoff') ]] && {
|
||||
exec >"$ttyItems" 2>&1
|
||||
break
|
||||
}
|
||||
done
|
||||
|
||||
insertIntoFile() {
|
||||
file=$1
|
||||
location=$2
|
||||
|
@ -35,6 +25,16 @@ 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")
|
||||
[[ -n "$ttyAttribute" && -n $(echo "$ttyAttribute" | grep -o 'ixoff') ]] && {
|
||||
exec >"$ttyItems" 2>&1
|
||||
break
|
||||
}
|
||||
done
|
||||
|
||||
# Get Alpine Linux configurations.
|
||||
confFile="/root/alpine.config"
|
||||
|
||||
|
|
Loading…
Reference in a new issue