mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
ENABLE_OTG_SERIAL
This commit is contained in:
parent
65a471db99
commit
1f6bd0c590
@ -73,6 +73,29 @@ if [ -n "$FIRSTBOOT$FIRST_BOOT" ]; then
|
||||
fi
|
||||
|
||||
|
||||
# ========== OTG serial ==========
|
||||
|
||||
if [ -n "$ENABLE_OTG_SERIAL" ]; then
|
||||
cat <<end_of_file > /etc/kvmd/override.d/0000-vendor-otg-serial.yaml
|
||||
# Generated by kvmd-bootconfig. Do not edit this file!
|
||||
otg:
|
||||
devices:
|
||||
serial:
|
||||
enabled: true
|
||||
end_of_file
|
||||
grep '^ttyGS0$' /etc/securetty || echo ttyGS0 >> /etc/securetty
|
||||
mkdir -p /etc/systemd/system/getty@ttyGS0.service.d
|
||||
cat <<end_of_file > /etc/systemd/system/getty@ttyGS0.service.d/ttyGS0.override
|
||||
[Service]
|
||||
TTYReset=no
|
||||
TTYVHangup=no
|
||||
TTYVTDisallocate=no
|
||||
end_of_file
|
||||
systemctl enable getty@ttyGS0.service
|
||||
REBOOT=1
|
||||
fi
|
||||
|
||||
|
||||
# ========== SSH ==========
|
||||
|
||||
if [ -n "$SSH_PORT" ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user