Skip to content

Conversation

@MickLesk
Copy link
Member

@MickLesk MickLesk commented Dec 7, 2025

✍️ Description

Previously, OS name and version were captured at installation time and written statically to the MOTD profile script. After OS upgrades, the displayed version would still show the old version.

Now OS info is read dynamically from /etc/os-release on each login, similar to how hostname and IP are already handled.

Affects both Debian/Ubuntu (install.func) and Alpine (alpine-install.func).

🔗 Related Issue

Fixes #9711

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

Previously, OS name and version were captured at installation time
and written statically to the MOTD profile script. After OS upgrades,
the displayed version would still show the old version.

Now OS info is read dynamically from /etc/os-release on each login,
similar to how hostname and IP are already handled.

Affects both Debian/Ubuntu (install.func) and Alpine (alpine-install.func).
@MickLesk MickLesk requested a review from a team as a code owner December 7, 2025 18:32
@MickLesk MickLesk changed the title feat(motd): dynamically read OS version on each login core: motd - dynamically read OS version on each login Dec 7, 2025
Copy link
Member

@CrazyWolf13 CrazyWolf13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

I just tried for ages to write a single sed command to inject the new dynamic motd, but it seems impossible with all that string quotation.

I'll just update my docs

@michelroegl-brunner michelroegl-brunner merged commit 5e5a8cd into main Dec 7, 2025
2 checks passed
@MickLesk MickLesk deleted the feat/motd-dynamic-os-version branch December 8, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dynamic motd message about OS version

4 participants