Skip to content

Commit a2845f4

Browse files
Kabuki94claude
andcommitted
fix(motd): break getty.target ordering cycle + clean dashboard rendering
Three fixes from the latest WSL2 boot log: 1. mios-dashboard-issue.service was creating an ordering cycle: multi-user.target -> mios-dashboard-issue.service -> getty.target -> multi-user.target ...because getty.target is WantedBy=multi-user.target, and the unit had `After=multi-user.target` AND `Before=getty.target`. systemd broke the cycle by deleting getty.target's start job: "Job getty.target/start deleted to break ordering cycle" Net effect: NO console getty spawned at boot. Operators got into the distro via wsl.exe's /init bypass; bare-metal/Hyper-V/QEMU deploys would have had no login prompt. Removed `Before=getty.target serial-getty@.service getty@.service` entirely. The 2-minute OnBootSec timer + getty's Restart=always pick up the fresh issue.d snippet within minutes of boot anyway. 2. Dashboard double-rendered with the ASCII art bleeding into the MiOS module column: :cllllllllccclcllllllllllllcc; MiOS Self-replication loopcccccccc:. Caused by fastfetch embedding mios-dashboard.sh --services-only as a custom command-module inside its side-by-side column layout, then the wrapper printing the services block again at the bottom. - Removed the MiOS custom module from fastfetch config; fastfetch now shows ONLY standard system info. - mios-dashboard.sh's default mode flow: header -> fastfetch (system info) -> services block -> loop hint Each block is full-width, no column collision. - Renamed print_services -> print_services_block (no loop hint embedded); --services-only mode prints services_block alone (used by /etc/issue.d/ and any future embedded contexts). 3. Loop hint no longer prints twice. Open from this boot, NOT addressed in this commit: - podman-system-generator failed exit status 1 -- still happening, all Quadlets render as "missing" in the dashboard. Need the generator's stderr (`journalctl -u podman-system-generator` or manual invocation) to identify which .container file has bad syntax. - "Failed to connect to system scope bus" at user login despite dbus-daemon-wsl now showing [OK] Started -- timing or socket-path drift; needs a separate diagnosis pass. - "Credential name or glob \"tty.virtual.mios/dashboard/issue.agetty.*\" not valid" warnings from getty@.service:48-49 -- upstream systemd 259 credential validator complaining about path-shaped names from the issue.d glob; informational only ("ignoring"), not fatal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 293da16 commit a2845f4

3 files changed

Lines changed: 29 additions & 33 deletions

File tree

usr/lib/systemd/system/mios-dashboard-issue.service

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212
[Unit]
1313
Description='MiOS' dashboard -> /etc/issue.d (pre-login banner)
1414
Documentation=file:///usr/libexec/mios/mios-dashboard-render-issue.sh
15-
After=multi-user.target console-login-helper-messages.service
16-
Before=getty.target serial-getty@.service getty@.service
15+
# DO NOT use Before=getty.target -- getty.target is WantedBy=multi-user.target,
16+
# so combining After=multi-user.target with Before=getty.target creates an
17+
# ordering cycle:
18+
# multi-user.target -> mios-dashboard-issue -> getty.target -> multi-user.target
19+
# systemd breaks the cycle by deleting getty.target's start job, which means
20+
# NO console getty spawns at boot. The 2-minute OnBootSec timer + getty's
21+
# Restart=always pick up the issue.d snippet within minutes of boot anyway.
22+
After=local-fs.target console-login-helper-messages.service
1723
ConditionPathExists=/usr/libexec/mios/mios-dashboard-render-issue.sh
1824

1925
[Service]

usr/libexec/mios/mios-dashboard.sh

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -186,46 +186,41 @@ print_loop_hint() {
186186
"$C_GRY" "$MIOS_LINUX_USER" "$MIOS_LINUX_USER" "$C_R"
187187
}
188188

189-
print_services() {
189+
print_services_block() {
190190
print_endpoints
191191
print_quadlets
192192
print_git_state
193-
print_loop_hint
194193
}
195194

196195
# ── Main ──────────────────────────────────────────────────────────────────────
197196
case "$MODE" in
198197
services-only)
199-
print_services
198+
# Used by fastfetch as a custom command-module embedded inside its
199+
# column layout, AND by mios-dashboard-render-issue.sh writing to
200+
# /etc/issue.d. Both contexts want the services block ALONE, no
201+
# loop hint -- the wrapper that called us prints the hint itself.
202+
print_services_block
200203
;;
201204
*)
205+
# Default: header -> fastfetch (system info ONLY, no MiOS module
206+
# because side-by-side multi-line text bleeds into the ASCII logo
207+
# column) -> services block -> loop hint.
202208
printf '\n %s%sMiOS%s %sv%s%s %s%s%s\n' \
203209
"$C_B" "$C_CYN" "$C_R" "$C_D" "$MIOS_VERSION" "$C_R" \
204210
"$C_GRY" "$(uname -srm)" "$C_R"
205211
hr_line 79
206212

207-
# Fastfetch sits between the header and the services block.
208-
# Use the MiOS-themed config when present; fall back to its
209-
# default when fastfetch can't find ours (e.g. fresh image
210-
# before tmpfiles ran). Suppress fastfetch errors -- never
211-
# block the dashboard on a fastfetch hiccup.
212213
if command -v fastfetch >/dev/null 2>&1; then
213214
local_cfg=/usr/share/mios/fastfetch/config.jsonc
214215
if [[ -r "$local_cfg" ]]; then
215216
fastfetch -c "$local_cfg" 2>/dev/null || fastfetch 2>/dev/null || true
216217
else
217218
fastfetch 2>/dev/null || true
218219
fi
219-
else
220-
print_services
221-
exit 0
222-
fi
223-
# When fastfetch's custom MiOS module printed the services
224-
# block, skip the second copy. Detect by checking whether the
225-
# config exists -- if not, fastfetch won't have shown it.
226-
if [[ ! -r /usr/share/mios/fastfetch/config.jsonc ]]; then
227-
print_services
228220
fi
221+
# Services block always renders below fastfetch (or alone if
222+
# fastfetch is absent). Full-width, no column collision.
223+
print_services_block
229224
print_loop_hint
230225
;;
231226
esac

usr/share/mios/fastfetch/config.jsonc

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
33

4-
// MiOS fastfetch config -- standard system info + a custom MiOS module
5-
// that shells out to /usr/libexec/mios/mios-dashboard.sh in
6-
// --services-only mode so the self-replication-loop status (Forge / AI /
7-
// Cockpit / Ollama / Quadlet rollup / git working tree state) sits
8-
// inline with the other fastfetch modules.
4+
// MiOS fastfetch config -- standard system info ONLY. The MiOS
5+
// dashboard's services block (self-replication loop + Quadlet rollup
6+
// + git state) is printed AFTER fastfetch returns, full-width, by
7+
// mios-dashboard.sh's default mode. An earlier iteration embedded
8+
// the services block as a fastfetch custom command-module, but
9+
// fastfetch's column layout made multi-line module output bleed
10+
// into the ASCII logo column on the right; rendering the block
11+
// separately below fastfetch keeps both surfaces clean.
912
//
1013
// Invoked from:
1114
// /etc/profile.d/zz-mios-motd.sh -> /usr/libexec/mios/mios-dashboard.sh -> fastfetch -c <this>
@@ -33,14 +36,6 @@
3336
{ "type": "swap", "key": "Swap" },
3437
{ "type": "disk", "key": "Disk" },
3538
{ "type": "localip", "key": "Local IP" },
36-
{ "type": "locale", "key": "Locale" },
37-
"break",
38-
{
39-
"type": "command",
40-
"shell": "/bin/bash",
41-
"key": "MiOS",
42-
"keyColor": "blue",
43-
"text": "/usr/libexec/mios/mios-dashboard.sh --services-only"
44-
}
39+
{ "type": "locale", "key": "Locale" }
4540
]
4641
}

0 commit comments

Comments
 (0)