learningequality / kolibri-installer-debian

Kolibri installer source for Debian
MIT License
0 stars 8 forks source link

Remove /etc/default/kolibri #85

Open benjaoming opened 4 years ago

benjaoming commented 4 years ago

Discussed with @jredrejo

We might not be benefiting from /etc/default/kolibri at all - the code can be moved to /etc/init.d/kolibri which initially sources it.

  1. This will reduce a layer
  2. This will also reduce a "configuration madness" vector: We don't encourage anyone to put configuration in /etc/default/kolibri, but we still risk that they'll go and do it anyways :)

I wrongfully discouraged using this file, as I have seen it change during .deb upgrades. But actually in the background info I can find on this location, people actually wanted this directory to discourage editing of the init.d scripts themselves :)

https://askubuntu.com/questions/429592/what-is-the-purpose-of-etc-default

benjaoming commented 4 years ago

I'm +1 or +0 for this change, unless someone has an objection :)

jredrejo commented 4 years ago

I think that KOLIBRI_HOME and KOLIBRI_USER variables from /etc/default/kolibriare useful (they are reused in the kolibri-server init script). The rest of the file is not needed from my pov.

If we delete this file, kolibri-server would use the same function to calculate KOLIBRI_HOME, what's not a big problem, just a bit of code duplication.

benjaoming commented 4 years ago

Am not suggesting to delete the contents. I would just move those contents unchanged to /etc/init.d/kolibri

Everything that can be configured for Kolibri should be configured somewhere that is genuinely owned by the system administrator and not overwritten by package updates. We should not encourage to hack files that are maintained by the package, that's why we have /etc/kolibri

/etc/default/kolibri has the logic that loads /etc/kolibri - so removing that would contradict the whole current design, which is documented and used.

benjaoming commented 4 years ago

Hmm, I can see the point of sourcing /etc/default/kolibri in kolibri-server

benjaoming commented 4 years ago

Maybe let's just freeze this for later, it's not in order to fix any real issues