Skip to content

Commit 5e731d3

Browse files
Kabuki94claude
andcommitted
fix(motd): remove legacy /usr/libexec/mios/motd + /usr/lib/profile.d/mios-motd.sh
Per operator directive: "legacy is now deprecated and should be streamlined into the current codebase and then removed after consolidation". The MOTD/dashboard system has had two coexisting implementations since v0.2.0 -- the legacy pair (motd binary + profile.d trigger) and the canonical pair (mios-dashboard.sh + zz-mios-motd.sh). Now consolidating to the canonical pair only. What's removed ────────────── usr/lib/profile.d/mios-motd.sh Legacy profile.d trigger that called fastfetch + the legacy /usr/libexec/mios/motd renderer. Only fired if /usr/lib/profile.d/ was sourced by /etc/profile (NOT standard on Fedora -- typically only /etc/profile.d/ is sourced). Even when it did fire, it duplicated zz-mios-motd.sh's work without any "shown once" guard, re-flooding the operator with banner+fastfetch+motd inside every tmux pane / SSH session. Pure dead weight on a deployed host; active duplication on MiOS-DEV (where overlay-builder.sh copies both into /etc/profile.d/). usr/libexec/mios/motd Legacy ~7 KB MOTD renderer. Older approach: own ANSI escape sequences, own banner, own dashboard layout, no tty0/console degradation, no frame, no ticker. Superseded by /usr/libexec/mios/mios-dashboard.sh (16 KB) which renders inside an 80-column frame with proper tty0 fallback, consolidates fastfetch via --services-only mode, supports --no-color / --no-frame / --ticker, and is the declared canonical entry point per its docstring + per zz-mios-motd.sh + per /usr/bin/mios-dash. What's kept (canonical chain) ───────────────────────────── /etc/profile.d/zz-mios-motd.sh Profile.d trigger. zz- prefix sorts last, runs after mios-env.sh. Gated on PS1 set + TTY + dedup ($MIOS_MOTD_SHOWN) + skips inside tmux/screen. Calls mios-dashboard.sh. /usr/libexec/mios/mios-dashboard.sh Canonical renderer. Frame + ASCII art + fastfetch + services block + loop hint. Read by /etc/profile.d/zz-mios-motd.sh on interactive shell login + by /usr/bin/mios-dash for manual refresh + by mios-dashboard-issue.service to render to /etc/issue.d/ for the pre-login banner. /usr/bin/mios-dash Operator-facing wrapper. `mios-dash` from any shell triggers the canonical dashboard render. What's updated (cosmetic) ───────────────────────── tools/lib/install-env.ps1 Comment in /etc/mios/install.env referenced the legacy /usr/libexec/mios/motd path. Updated to point at /usr/libexec/mios/mios-dashboard.sh. Net effect for the operator ─────────────────────────── - One MOTD path instead of two. No duplication, no race-to-render, no ambiguity about "which file do I edit to change the banner." - Slightly slimmer image (-7.7 KB legacy renderer + the 412-byte legacy trigger). - The SSH-into-MiOS-DEV path now renders the canonical dashboard exactly once, matching what a deployed MiOS host shows. Manifesto alignment: "the unified installation dashboard is visible and enhanced with the mios dash showing the banner/header ascii art, the fastfetch stats, the mios motd stats" -- this is now THE rendering chain. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 12394da commit 5e731d3

3 files changed

Lines changed: 1 addition & 163 deletions

File tree

tools/lib/install-env.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function Write-MiosInstallEnv {
3838
# ever appear in the hash, so the wrap is safe.
3939
$lines = @(
4040
"# /etc/mios/install.env -- written by the 'MiOS' Windows installer.",
41-
"# Read by /usr/libexec/mios/wsl-firstboot, /usr/libexec/mios/motd,",
41+
"# Read by /usr/libexec/mios/wsl-firstboot, /usr/libexec/mios/mios-dashboard.sh,",
4242
"# and /usr/libexec/mios/forge-firstboot.sh.",
4343
"# Vendor defaults: /usr/share/mios/env.defaults",
4444
"MIOS_USER=$User",

usr/lib/profile.d/mios-motd.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

usr/libexec/mios/motd

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)