src/confd: add the ability to change MotD in cli#7
src/confd: add the ability to change MotD in cli#7troglobit merged 1 commit intokernelkit:sysrepofrom
Conversation
|
First of all, Yes, this is something we want, and it's a great example to start with I think! Now, there are a few things that I believe need to be fixed:
Oh, and you don't need to remove the duplicate /etc/motd file. Infix has three operating modes (selectable with the Last, Augeas is a really cool project and for anything more complex it's super useful. However, it's perfectly OK to render all simple files manually like you've done (and I did with chrony.conf). After all, we've got a lot of models to implement ... ;-) |
Add the ability to set and delete system MotD (Message Of The Day) using the cli. This patch augments the standard ietf-system yang schema with a new infix-system schema which contains a new motd leaf. The default value is hard coded in two places, confd and the rootfs file /etc/motd. The intention is to fix this in upcoming patches. Introduces: exec> configure> set system motd STRING exec> configure> delete system motd
Pull Request
Not sure if this is even something we want? I did it mainly to learn and to test the work flow.
If this is indeed something we want then I intent to fix the duplication of the default value (in skel /etc/motd and in the confd C code).
I might also hook it into the
augframework, even tho it should never fail (TM) and "abort" seems to work as intended?Commit message
Add the ability to set and delete system MotD (Message Of The Day) using the cli.
So there's no staging concept (aug), if user issues "leave" the change takes immediate effect.
The default value is hard coded in two places, confd and the rootfs file /etc/motd. The intention is to fix this in upcoming patches.
Introduces:
exec> configure> set system motd STRING
exec> configure> delete system motd