Skip to content

Commit 9fbb177

Browse files
authored
B #-: Alpine fix tty0, drops chrony (#185)
Although chrony is enabled in cloud images, it sometimes causes long starts and delaying also sshd.
1 parent a6c3636 commit 9fbb177

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packer/alpine/11-update-boot.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ if [ "$(arch)" = "x86_64" ]; then
1616

1717
gawk -i inplace -f- /etc/update-extlinux.conf <<'EOF'
1818
/^default_kernel_opts=/ { gsub(/console=ttyS[^ "]*/, "") }
19+
/^default_kernel_opts=/ { gsub(/console=ttyAMA[^ "]*/, "console=tty0") }
1920
{ print }
2021
EOF
2122
fi

packer/alpine/98-collect-garbage.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ set -eux -o pipefail
88
apk del cloud-init
99
find /etc/runlevels/ -name 'cloud-init*' -delete
1010

11+
# chrony sometimes takes too long to start also delaying sshd
12+
service chronyd stop
13+
apk del chrony
14+
userdel chrony
15+
1116
rm -f /etc/motd
1217

1318
rm -rf /var/cache/apk/*

0 commit comments

Comments
 (0)