Code Monkey home page Code Monkey logo

Comments (4)

kelvinfan001 avatar kelvinfan001 commented on August 15, 2024 1

Perhaps a new service similar to console-login-helper-messages-gensnippet-os-release.service? We use a systemd service that executes a script that writes to the MOTD directories. This will have the information be displayed every time someone logs in (in FCOS, this means every time someone logs in via SSH and console), but at the same time, we can make this easily silence-able (by doing e.g. systemctl disable --now console-login-helper-messages-gensnippet-common-warnings.service. We probably also need to add ExecStop= to the CLHM systemd units that write to /run/motd.d to clean up the snippets that they own from the /run directories so users don't need to reboot for the messages to be silenced the next time they log in.
(But this also means there will be yet another systemd preset users will need to enable when installing/using CLHM, https://github.com/coreos/console-login-helper-messages/blob/main/doc/manual.md#integrating-into-a-distribution is unforunately quite long right now 😅)

While we're at it, would it be a good idea to give the "failed systemd units" warning currently implemented as part of profile.sh the same treatment? Currently, the only way to silence failed systemd units warning is by uninstalling console-login-helper-messages-profile.

Edit: the above solution doesn't make sense for this use case since we want a way for the script to be run every time a user logs in, and still be easily silence-able.

from console-login-helper-messages.

dustymabe avatar dustymabe commented on August 15, 2024 1

ah, sorry, I misinterpreted the issue. The emphasis here is on running the script more frequently (upon login), instead of displaying frequently.

ehh. I think I wasn't super clear. I think there are two things I'm rolling into this discussion:

  • how (where?) do we easily add new warnings/helpers for people that we want to share
    • need to also make it easy to know how to disable the helper/warning
  • can we handle the case where the warning/helper needs to run more than once per boot
    • if yes, what's the best way to do that?

So if I'm understanding the problem correctly, what we want to figure out now is a way to have a script be updated/run regularly (e.g. every time a user logs in, like profile.sh), but also be easily silenced. In this case, a systemd timer unit does indeed sound promising.

Yeah a timer might be nice.

from console-login-helper-messages.

dustymabe avatar dustymabe commented on August 15, 2024

I think one thing to think about here is helpers that are sufficient to run once on boot (i.e. the check for cgroups v1 versus v2 needs to only happen once) versus helpers that need to be updated periodically while booted (like systemd failed units check). Not sure if there is an easy way to service that second class without the profile.d bits, but maybe there are clever solutions we could use. Maybe a systemd timer to periodically run them?

from console-login-helper-messages.

kelvinfan001 avatar kelvinfan001 commented on August 15, 2024

ah, sorry, I misinterpreted the issue. The emphasis here is on running the script more frequently (upon login), instead of displaying frequently.
So if I'm understanding the problem correctly, what we want to figure out now is a way to have a script be updated/run regularly (e.g. every time a user logs in, like profile.sh), but also be easily silenced. In this case, a systemd timer unit does indeed sound promising.

from console-login-helper-messages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.