Am Mon, 28 Sep 2020 15:33:36 +0200 schrieb Thorsten Kukuk <kukuk@suse.de>:
When I wrote the first mail I also thought about a valid usecase for keeping /etc/sysconfig today. I haven't found one.
The obvious one: We are SUSE, we do it that way since two decades. The potential trouble with fillup will also happen with every other location: stale admin controlled key=value entries will remain unless the pkg provides an upgrade path. Some pkgs have one, most pkgs do not. It is up to each pkg to decide how to move forward with existing files. Using two 'EnvironmentFile=' statements is certainly a nice feature, whether it really solves anything depends on the individual pkg. The comments in sysconfig could be adjusted if someone would just have done the hard work of proper text processing... But I think our usage of sysconfig is an example of "how to put documentation in the wrong place". One consumer of properly formatted comments was, and maybe still is, YaST2. A better place for documentation of each potential variable is a man page, and in case of YaST2 a separate rpm-controlled text file. I briefly looked through all files stored in {/usr,}/etc/default. Most of them should be removed right away. Many empty variables, even empty(!) config files. Of course each pkg has different requirements. My prime nit remains grub: None of the variables in /etc/default/grub must be provided by rpm. Undefined variables have to be handled anyway in the shell script. None of the recognized variables are documented. YaST writes /etc/default/grub anyway, so it will be always "dirty". Olaf