mirror of
https://github.com/GNS3/gns3-registry.git
synced 2025-01-31 16:35:29 +00:00
packer/alpine-linux: serial console support review
This does not change much, but provides some more kernel diagnostics to the serial console, and even though it was not broken, returns getty to the role of terminal handler (always with passwordless autologin).
This commit is contained in:
parent
45c08a4481
commit
8388697eb5
@ -1,5 +1,17 @@
|
||||
# use serial console
|
||||
sed -i 's/\(APPEND .*\)/\1 console=ttyS0/' /boot/extlinux.conf
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# use serial console and remove quiet
|
||||
sed -i 's/\(APPEND .*\)/\1 console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0/' /boot/extlinux.conf
|
||||
sed -i '/\(APPEND .*\)/s/[[:space:]]*quiet[[:space:]]*/ /g' /boot/extlinux.conf
|
||||
|
||||
|
||||
# autologin on serial console
|
||||
sed -i 's/^ttyS0.*/ttyS0::respawn:\/bin\/login -f root/' /etc/inittab
|
||||
cat <<'EOF' | tee /usr/local/bin/rootlogin
|
||||
#!/bin/sh
|
||||
exec /bin/login -f root
|
||||
EOF
|
||||
chmod +x /usr/local/bin/rootlogin
|
||||
#/sbin/getty -L ttyS0 115200 vt100
|
||||
sed -i 's/^ttyS0.*/ttyS0::respawn:\/sbin\/getty -n -l \/usr\/local\/bin\/rootlogin -L ttyS0 115200 vt100/' /etc/inittab
|
||||
|
Loading…
x
Reference in New Issue
Block a user