summaryrefslogtreecommitdiff
path: root/scripts/kvmd-bootconfig
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-10-29 19:57:51 +0300
committerMaxim Devaev <[email protected]>2021-10-29 19:57:51 +0300
commit1f6bd0c5905ca304993e505a389b8193522f7d2c (patch)
treee010d128b4a875066200ee695d389588ef6613e7 /scripts/kvmd-bootconfig
parent65a471db99c3c2b9f154b6f5916cac533e27d844 (diff)
ENABLE_OTG_SERIAL
Diffstat (limited to 'scripts/kvmd-bootconfig')
-rwxr-xr-xscripts/kvmd-bootconfig23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/kvmd-bootconfig b/scripts/kvmd-bootconfig
index c800205e..bdea9c1b 100755
--- a/scripts/kvmd-bootconfig
+++ b/scripts/kvmd-bootconfig
@@ -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/[email protected]
+ cat <<end_of_file > /etc/systemd/system/[email protected]/ttyGS0.override
+[Service]
+TTYReset=no
+TTYVHangup=no
+TTYVTDisallocate=no
+end_of_file
+ systemctl enable [email protected]
+ REBOOT=1
+fi
+
+
# ========== SSH ==========
if [ -n "$SSH_PORT" ]; then