azlux / log2ram

ramlog like for systemd (Put log into a ram folder)
MIT License
2.62k stars 193 forks source link

[Feature Request] Ability to include config snippets #229

Open samveen opened 3 months ago

samveen commented 3 months ago

Recently, while upgrading (to The Return of the Dev, probably) , I received the following alert while upgrading log2ram:

Configuration file '/etc/log2ram.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** log2ram.conf (Y/I/N/O/D/Z) [default=N] ? 

To work around this, log2ram would do great to have an include facility for configuration, so that the distribution configuration isn't modified, and instead, custom configuration can be added as configuration snippets into /etc/log2ram.d (or `/etc/log2ram.conf.d, or some other well-named/well-known path).

If it's easily possible, it'd be great to have. If not, the existing way works (with a bit of extra elbow grease on upgrades).