Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

motd: maintain a /etc/motd file with interesting info about the TAC #57

Closed
wants to merge 1 commit into from

Conversation

hnez
Copy link
Member

@hnez hnez commented Jan 26, 2024

Not anyone looks at the web interface or the display of the TAC.
These users will not be notified about updates or issues with the TAC.

Add a third information vector so we can reach these users as well.

This will result in messages like these when a user logs into the TAC via ssh and there is some information to display:

leonard@fulladder ~> ssh root@lxatac-00011
Last login: Fri Jan 26 17:53:06 2024 from 192.168.94.2
Welcome to you TAC!

- NOTE: The device under test is currently powered on.
leonard@fulladder ~> ssh root@lxatac-00011
Last login: Fri Jan 26 17:52:05 2024 from 192.168.94.2
Welcome to you TAC!

- WARNING: The LXA IOBus power supply is overloaded.
leonard@fulladder ~> ssh root@lxatac-00011
Last login: Fri Jan 26 17:53:20 2024 from 192.168.94.2
Welcome to you TAC!

- WARNING: The USB port power supply is overloaded.

I think it would be nice to show a random tip if we have nothing else to say, but that should go into a separate PR.

TODO before merging:

  • Some cleanup and comments

@hnez hnez changed the title motd: maintain a /etc/motd file with interesting info abot the TAC motd: maintain a /etc/motd file with interesting info about the TAC Jan 29, 2024
@hnez hnez self-assigned this Mar 1, 2024
@hnez
Copy link
Member Author

hnez commented Mar 1, 2024

I think a structured list with colored - info:, - warning: and - error: prefixes would be more readable than this free-form text variant.

@hnez hnez requested a review from KarlK90 June 14, 2024 12:51
@hnez hnez assigned KarlK90 and unassigned hnez Jun 14, 2024
@hnez hnez marked this pull request as ready for review June 14, 2024 12:52
@hnez
Copy link
Member Author

hnez commented Jun 14, 2024

Hi, I've re-worked this PR now and think it is ready for review.

The failing cargo clippy runs are not caused by this PR - cargo clippy just learned a few new tricks that also make it fail on main.
This should be fixed by #70, which should be merged first, so we can see the CI succeed before merging.

Copy link
Member

@SmithChart SmithChart left a comment

Choose a reason for hiding this comment

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

Just one minor nitpick on the actual messages.

Overall I like the way to present the user with some useful information at login.
(Maybe this will even increase the number of installed updates?)

src/motd.rs Outdated Show resolved Hide resolved
@hnez hnez force-pushed the update-motd branch 2 times, most recently from f11ed81 to d3939dd Compare June 17, 2024 05:40
@hnez hnez force-pushed the update-motd branch 3 times, most recently from b1efe81 to 6d01998 Compare July 9, 2024 10:51
@hnez
Copy link
Member Author

hnez commented Jul 26, 2024

Hi @KarlK90, could you have a look at this PR?
Users often tell me that they were not aware of any new updates, because they do not look at the web interface of display of the TAC.

Not anyone looks at the web interface or the display of the TAC.
This gives us a third vector to convey information to the user,
by showing messages on ssh login.

Use bind-mounts to put the highly volatile file itself to /var/run
and point to it from /etc.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
@hnez
Copy link
Member Author

hnez commented Aug 6, 2024

This PR was superceded by #77, which implements some of the features of this PR in a more elegant way.
See this summary for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants