Run kmscon on tty1 and provision through the console login wrapper (D-104)
This commit is contained in:
parent
0f968d6d3a
commit
d8c1aaec8b
5 changed files with 33 additions and 7 deletions
|
|
@ -186,9 +186,11 @@ ln -sfn /usr/share/zoneinfo/UTC /job/core/etc/localtime
|
|||
mkdir -p /job/core/etc/systemd/network
|
||||
cp /job/core/usr/lib/archipelago/defaults/20-wired.network /job/core/etc/systemd/network/
|
||||
ln -sfn /run/systemd/resolve/stub-resolv.conf /job/core/etc/resolv.conf
|
||||
systemctl --root=/job/core enable systemd-networkd systemd-resolved systemd-timesyncd sshd archipelago-ssh-keys archipelago-keyring archipelago-firstboot@tty1 getty@tty1 ostree-remount
|
||||
# kmscon owns VTs opened by logind (tty2+); tty1 stays getty/firstboot or the
|
||||
# display manager. The alias keeps the getty fallback from the packaged unit.
|
||||
systemctl --root=/job/core disable getty@tty1 archipelago-firstboot@tty1
|
||||
systemctl --root=/job/core enable systemd-networkd systemd-resolved systemd-timesyncd sshd archipelago-ssh-keys archipelago-keyring kmsconvt@tty1 ostree-remount
|
||||
# kmscon owns tty1 on Core/Container Runner (the login wrapper runs onboarding)
|
||||
# and VTs opened by logind (tty2+). Desktops disable the tty1 instance and keep
|
||||
# tty2+ only. The packaged OnFailure fallback starts getty with the same wrapper.
|
||||
mkdir -p /job/core/etc/kmscon /job/core/etc/systemd/system
|
||||
cp /job/core/usr/lib/archipelago/defaults/kmscon.conf /job/core/etc/kmscon/kmscon.conf
|
||||
ln -sfn /usr/lib/systemd/system/kmsconvt@.service /job/core/etc/systemd/system/autovt@.service
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Container Runner installed-system defaults. No graphical target or desktop stack.
|
||||
systemctl --root=/job/core disable systemd-networkd archipelago-firstboot@ttyS0 serial-getty@ttyS0
|
||||
systemctl --root=/job/core disable systemd-networkd archipelago-firstboot@tty1 getty@tty1 archipelago-firstboot@ttyS0 serial-getty@ttyS0
|
||||
# Keep the console onboarding path; the installed system is a multi-user server.
|
||||
systemctl --root=/job/core enable NetworkManager cockpit.socket getty@tty1 archipelago-firstboot@tty1
|
||||
systemctl --root=/job/core enable NetworkManager cockpit.socket kmsconvt@tty1
|
||||
systemctl --root=/job/core set-default multi-user.target
|
||||
mkdir -p /job/core/etc/cockpit /job/core/etc/NetworkManager/conf.d /job/core/etc/sudoers.d
|
||||
# Cockpit's stock self-signed certificate; never allow plaintext or unauthenticated use.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Initial clean GNOME integration profile only; not a generic rebase adapter.
|
||||
systemctl --root=/job/core disable systemd-networkd archipelago-firstboot@tty1 archipelago-firstboot@ttyS0 getty@tty1 serial-getty@ttyS0
|
||||
systemctl --root=/job/core disable systemd-networkd archipelago-firstboot@tty1 archipelago-firstboot@ttyS0 getty@tty1 serial-getty@ttyS0 kmsconvt@tty1
|
||||
systemctl --root=/job/core enable NetworkManager gdm bluetooth cups.socket power-profiles-daemon switcheroo-control \
|
||||
archipelago-gnome-onboarding.timer
|
||||
systemctl --root=/job/core set-default graphical.target
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Clean Core + KDE composition; existing-machine rebase is a separate workflow.
|
||||
systemctl --root=/job/core disable systemd-networkd archipelago-firstboot@tty1 archipelago-firstboot@ttyS0 getty@tty1 serial-getty@ttyS0
|
||||
systemctl --root=/job/core disable systemd-networkd archipelago-firstboot@tty1 archipelago-firstboot@ttyS0 getty@tty1 serial-getty@ttyS0 kmsconvt@tty1
|
||||
systemctl --root=/job/core enable NetworkManager sddm plasma-setup bluetooth cups.socket power-profiles-daemon \
|
||||
archipelago-kde-onboarding.timer archipelago-software-refresh.timer
|
||||
systemctl --root=/job/core set-default graphical.target
|
||||
|
|
|
|||
|
|
@ -80,6 +80,30 @@ font-size=0
|
|||
xkb-model=pc105
|
||||
xkb-layout=us,ru
|
||||
xkb-options=grp:alt_shift_toggle
|
||||
login=/usr/bin/archipelago-console-login
|
||||
EOF
|
||||
cat > "$pkg/runtime/usr/bin/archipelago-console-login" <<'EOF'
|
||||
#!/bin/bash
|
||||
# kmscon/agetty login program: run Core/Container Runner onboarding on the
|
||||
# console once, then hand over to the normal login prompt. Desktops use their
|
||||
# graphical provisioners and the live ISO must never start firstboot here.
|
||||
set -u
|
||||
if [[ ! -e /run/archipelago-live && -e /run/ostree-booted \
|
||||
&& ! -e /etc/archipelago/provisioned \
|
||||
&& ! -e /usr/lib/archipelago/gnome-firstboot \
|
||||
&& ! -e /usr/lib/archipelago/kde-firstboot ]]; then
|
||||
/usr/bin/systemctl start archipelago-keyring.service >/dev/null 2>&1 || true
|
||||
/usr/bin/archipelago firstboot || true
|
||||
fi
|
||||
exec /bin/login -p
|
||||
EOF
|
||||
chmod 0755 "$pkg/runtime/usr/bin/archipelago-console-login"
|
||||
# Fallback getty on tty1 must offer the same onboarding if kmscon fails.
|
||||
mkdir -p "$pkg/runtime/etc/systemd/system/getty@tty1.service.d"
|
||||
cat > "$pkg/runtime/etc/systemd/system/getty@tty1.service.d/50-archipelago-console-login.conf" <<'EOF'
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --login-program /usr/bin/archipelago-console-login --noclear %I $TERM
|
||||
EOF
|
||||
cat > "$pkg/runtime/usr/lib/archipelago/defaults/20-wired.network" <<'EOF'
|
||||
[Match]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue