On Tue, Jul 04, 2023 at 11:24:21AM +0200, Andreas Henriksson wrote:
Hello Francesco P. Lovergine,

Thanks for your feedback on this!

On Mon, Jul 03, 2023 at 06:17:20PM +0200, Francesco P. Lovergine wrote:
Uhm, it seems to me quite irritual using a template unit file without a 
template variable. Which reflects
the quite strange use of /etc/default/vtun with multiple indexed vars,
instead of multiple configuration files such as:

/etc/vtun.d/config?.vars (or even under /etc/vtun if you prefer so)

and of course you can override the env variables by using an
/etc/vtun.d/%i.vars

where it makes sense in the template file. I think this would be the right 
moment to convert the
insane limited number of env var sets in /etc/default/vtun into multiple 
ordinary configuration
files and using something like that.

EnvironmentFile=-/etc/vtun.d/%i.vars

would override name, host and args variables.

I'm missing something?

While I atleast partially agree with your initial sentence, I'm not
onboard with your suggested solution.
In my understanding use of EnvironmentFile= is discuraged (and if I'm
not mistaken I've even read statements saying it was a mistake to ever
add it as an option).

It seems to me like you're bending over backwards trying to invent
something that actually needs the instance variable.

(I'm however fine with anything that gets things moving forward of using
native units instead of init script. I'm also not even a user of this
package/program as previously stated, so it affects me very little.
Use what ever solution you find acceptable!)

Regards,
Andreas Henriksson


First of all, sorry for the use of irritual instead of weird (false friend term 
applies
in this case, for non native speakers).
About the discouraging of EnvironmentFile could you please point where
it is expressed in the Policy? For sure, Debian has impressive use of the 
/etc/default/ tree
which was and still is Debian specific. That is probably the origin of those 
rumors.

Indeed, enabling/disabling of services by using an option in /etc/default/ (as 
for a lots
of services in the past) is considered a bad practice due to the old init sysv days. Today, one should enable/disable the unit instead, which is much more clean. That make sense. I disagree with a general deprecation
of Environment entries instead (files or vars), which is optimal mode of solving
configuration issues without writing whole units or overrides. But on those 
regards,
using a non-templated unit as a pseudo-templated is a very strange choice.

Anyway it is your choice.

--
Francesco P. Lovergine

Reply via email to