Comments (4)
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.
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.
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.
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)
- Investigate rpm-inspect failures
- Warn on modified SELinux policy HOT 1
- Warn on Zincati / rpm-ostree failing to apply updates to the system
- New CLHM release HOT 3
- Consider change for "mv -Z" in issue generator scripts HOT 1
- Add a conditional to the Makefile to optionally install the `/run/motd.d` tpmfiles config HOT 1
- Warn if /sysroot is not read only HOT 4
- support for more complex networking devices HOT 1
- racy use of shared file HOT 3
- Configuration file format
- issuegen should not run via udev rule when disbaled via systemd HOT 1
- agetty console should be reloaded upon generation of new issue snippet HOT 1
- display info from interfaces with custom names
- Move over to using `/run/motd.d/` instead of `/run/console-login-helper-messages/motd.d/` for the default included information generators units HOT 15
- files can't be overriden HOT 1
- Script to check user's environment
- Failed systemd units' names not showing in Fedora 33 HOT 3
- service fails if triggered too quickly HOT 10
- MOTD not showing after login via ssh
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from console-login-helper-messages.