libiio
libiio copied to clipboard
Systemd warns about unset variables
During startup of iiod, we get the following warning:
iiod.service: Referenced but unset environment variable evaluates to an empty string: IIOD_EXTRA_OPTS
This is because since v254 of systemd, unset environmental variables will result in a warning (see commit).
I could make a PR where I add this to the service file:
Environment=IIOD_EXTRA_OPTS=''
Would this be a good solution?
@dennis-ju IIOD_EXTRA_OPTS
is supposed to (optionally) be set in the config file, /etc/default/iiod
. Do you have a way to make it default to an empty string, but still be overridden by the config file if it exists?
Yes, I believe that adding the line Environment=IIOD_EXTRA_OPTS=''
would set it to an empty string while still being overridden if it is set in /etc/default/iiod
.
In the systemd manual (see link) under EnvironmentFile=
it says "Settings from these files override settings made with Environment=."
Is there a possibility that we could add this to the legacy branch?
Is there a possibility that we could add this to the legacy branch?
Yes
Lets re-open