Bugzilla – Bug 63477
Environment file parser gets confused by comments
Last modified: 2013-04-14 00:26:39 UTC
Created attachment 77894 [details]
service file used for debugging
After installing lm_sensors package, I discovered that lm_sensors.service wasn't picking up its environment variables from its EnvironmentFile= directive.
After some experimenting, I found that only the last environment variable defined in the environment file was non-blank.
I found that the only way to ensure that all variables are set is to remove all comments (preceded by '#') from the environment file.
As I'm not entirely sure what exactly in those comments is confusing systemd, I'm including a failing and a working environment file, as well as the service file I used for debugging.
Created attachment 77899 [details]
output of `systemctl status lm_sensors.service` after failure
Created attachment 77901 [details]
Created attachment 77902 [details]
output of `systemctl status lm_sensors.service` after success
Created attachment 77903 [details]
Fixed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=d3b6d0c21.