Description of problem: Unable to override environment variables in service file Steps to Reproduce: # cat > /etc/systemd/system/postgresql.service .include /lib/systemd/system/postgresql.service Environment=PGPORT=5432 Environment=PGDATA=/foo/pgsql/data ^D # systemctl daemon-reload Actual results: # systemctl show postgresql.service | grep Environment Environment=PGPORT=5432 PGDATA=/var/lib/pgsql/data Expected results: # systemctl show postgresql.service | grep Environment Environment=PGPORT=5432 PGDATA=/foo/pgsql/data Additional info: Not sure if it is a systemd limitation or not but if it is then instead of using Environment= something like EnvironmentFile=/etc/sysconfig/pgsql/postgres (does %p work there?) similar to what many other services use. Having to do a cp /lib/systemd/system/postgresql.service /etc/systemd/system/ isn't really an option.
Hm, yeah, I'd expect that to work too. But if it doesn't, it's a systemd bug not a bug in the particular service file.
My bad, Adding [Service] fixes it
If that was it, shouldn't systemd have complained that the lines were in the wrong section? It still seems like a bug, but in the nature of crummy error reporting rather than functionality.
systemd git will now generate a warning message in cases like this.
systemd-44-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/systemd-44-1.fc17
Package systemd-44-1.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-44-1.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-3918/systemd-44-1.fc17 then log in and leave karma (feedback).
systemd-44-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
systemd-37-19.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/systemd-37-19.fc16
systemd-37-19.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.