image: allow autologin on TTY1 for STACKIT cloud (#3499)

This commit is contained in:
Markus Rudy 2024-11-27 14:21:43 +01:00 committed by GitHub
parent 900fb3f88b
commit 6d7f687609
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 12 deletions

View file

@ -3,7 +3,7 @@ Description=Export Constellation Debug Level to Environment
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/bash -c "tr ' ' '\n' < /proc/cmdline | grep -q 'constellation.debug' && echo CONSTELLATION_DEBUG_FLAGS=--debug >> /run/constellation.env" ExecStart=/bin/bash -c "tr ' ' '\n' < /proc/cmdline | grep -q 'constel.debug' && echo CONSTELLATION_DEBUG_FLAGS=--debug >> /run/constellation.env"
RemainAfterExit=yes RemainAfterExit=yes
[Install] [Install]

View file

@ -2,7 +2,6 @@ enable systemd-timesyncd.service
enable systemd-networkd.service enable systemd-networkd.service
enable systemd-networkd-wait-online.service enable systemd-networkd-wait-online.service
enable configure-constel-csp.service enable configure-constel-csp.service
enable serial-getty@tty0.service
enable dbus.service enable dbus.service
enable dbus-broker.service enable dbus-broker.service
enable dbus-daemon.service enable dbus-daemon.service

View file

@ -0,0 +1,11 @@
[Unit]
Description=autologin
ConditionPathExists=/proc/cmdline
ConditionKernelCommandLine=|constel.console
ConditionKernelCommandLine=|constel.debug
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin root %I $TERM
[Install]
WantedBy=multi-user.target

View file

@ -1,8 +1,8 @@
[Unit] [Unit]
Description=autologin Description=autologin
ConditionPathExists=/proc/cmdline ConditionPathExists=/proc/cmdline
ConditionKernelCommandLine=|constellation.console ConditionKernelCommandLine=|constel.console
ConditionKernelCommandLine=|constellation.debug ConditionKernelCommandLine=|constel.debug
[Service] [Service]
ExecStart= ExecStart=

View file

@ -50,7 +50,7 @@ CSPS = [
"qemu", "qemu",
] ]
base_cmdline = "selinux=1 enforcing=0 audit=0" base_cmdline = "selinux=1 enforcing=0 audit=0 console=tty1 console=ttyS0"
csp_settings = { csp_settings = {
"aws": { "aws": {
@ -62,20 +62,17 @@ csp_settings = {
}, },
"azure": { "azure": {
"kernel_command_line_dict": { "kernel_command_line_dict": {
"console": "ttyS0",
"constel.csp": "azure", "constel.csp": "azure",
"mitigations": "auto,nosmt", "mitigations": "auto,nosmt",
}, },
}, },
"gcp": { "gcp": {
"kernel_command_line_dict": { "kernel_command_line_dict": {
"console": "ttyS0",
"constel.csp": "gcp", "constel.csp": "gcp",
"mitigations": "auto,nosmt", "mitigations": "auto,nosmt",
}, },
}, },
"openstack": { "openstack": {
"kernel_command_line": "console=tty0 console=ttyS0 console=ttyS1",
"kernel_command_line_dict": { "kernel_command_line_dict": {
"constel.csp": "openstack", "constel.csp": "openstack",
"kvm_amd.sev": "1", "kvm_amd.sev": "1",
@ -85,9 +82,8 @@ csp_settings = {
}, },
}, },
"qemu": { "qemu": {
"kernel_command_line": "constellation.console", # All qemu images have console enabled independent of stream "kernel_command_line": "constel.console", # All qemu images have console enabled independent of stream
"kernel_command_line_dict": { "kernel_command_line_dict": {
"console": "ttyS0",
"constel.csp": "qemu", "constel.csp": "qemu",
"mitigations": "auto,nosmt", "mitigations": "auto,nosmt",
}, },
@ -135,10 +131,10 @@ attestation_variant_settings = {
stream_settings = { stream_settings = {
"console": { "console": {
"kernel_command_line": "constellation.console", "kernel_command_line": "constel.console",
}, },
"debug": { "debug": {
"kernel_command_line": "constellation.debug", "kernel_command_line": "constel.debug",
}, },
"nightly": {}, "nightly": {},
"stable": {}, "stable": {},