Skip to content

Binary replacement for infix-system:motd - #324

Merged
troglobit merged 3 commits into
mainfrom
message-of-the-day
Mar 1, 2024
Merged

troglobit merged 3 commits into
mainfrom
message-of-the-day

Conversation

@troglobit

@troglobit troglobit commented Feb 29, 2024 •

Copy link
Copy Markdown
Contributor

Description

  • Mark infix-system:motd as obsolete, update its description accordingly
  • Add infix-system:motd-banner for Base64 encoded file data
  • Let gen-motd script use $(base64 -w0 /etc/motd)
  • Add klish feature to show its own Banner="", like /etc/profile.d/cli-hint.sh

Logic: new setting motd-banner is only used if motd is not set. The legacy setting always wins to preserve backwards compatibility.

Note: inspiration for the motd-banner name is taken from openconfig-system, which also has login-banner for text to be displayed before login. This matches perfectly with what OpenSSH has, Banner = /some/plain-file.txt, and would fit well with the overall augments we do in infix-system.

Screenshot

Infix -- a Network Operating System v23.11.0-325-gd88a4f4e-dirt (console)
infix-00-00-00 login: root
.-------.
|  . .  | Infix -- a Network Operating System
|-. v .-| https://kernelkit.github.io/
'-'---'-'

Run the command 'cli' for interactive OAM

root@infix-00-00-00:~$ cli

See the 'help' command for an introduction to the system

root@infix-00-00-00:/> 
root@infix-00-00-00:~$ logout

Infix -- a Network Operating System v23.11.0-325-gd88a4f4e-dirt (console)
infix-00-00-00 login: admin
Password: 
.-------.
|  . .  | Infix -- a Network Operating System
|-. v .-| https://kernelkit.github.io/
'-'---'-'

See the 'help' command for an introduction to the system

admin@infix-00-00-00:/> 

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

References

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit
troglobit requested review from mattiaswal and wkz February 29, 2024 19:19
@troglobit troglobit changed the title Binary replacement for infixy-system:motd Binary replacement for infix-system:motd Feb 29, 2024
@troglobit
troglobit marked this pull request as draft March 1, 2024 07:21
Inspired by openconfig-system[1], except the infix-system type is binary
to allow encoding an entire file, with optional control characters.

The openconfig-system model also carries login-banner, which is displayed
before login.  This could be added later to infix-system to let the user
set an OpenSSH login Banner.

[1]:  https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-system.html

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@troglobit
troglobit force-pushed the message-of-the-day branch from 6428e4a to a24d7a3 Compare March 1, 2024 07:37
@troglobit
troglobit marked this pull request as ready for review March 1, 2024 07:38
@troglobit troglobit added the enhancement New feature or request label Mar 1, 2024

@mattiaswal mattiaswal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@troglobit
troglobit merged commit b3e6a38 into main Mar 1, 2024
@troglobit
troglobit deleted the message-of-the-day branch March 1, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants