Hi,

I have created a systemd.unit(nfs-ganesha.service) file as below :

[Unit]

After=nfs-ganesha-config.service
Requires=nfs-ganesha-config.service
....

[Service]
EnvironmentFile=-/run/sysconfig/ganesha
ExecStart=/usr/bin/ganesha.nfsd $OPTIONS ${EPOCH}
........
.......



My intention is to execute/start nfs-ganesha-config.service always prior to running nfs-ganesha.service (even during restart).

nfs-ganesha-config.service writes certain configuration values to '/run/sysconfig/ganesha' which I would want nfs-ganesha.service to read before starting ganesha.nfsd daemon.

But from my tests I see that nfs-ganesha.service picks up old configuration values defined in '/run/sysconfig/ganesha' than the ones generated by 'nfs-ganesha-config.service' at that point. So I am assuming 'EnvironmentFile' gets loaded prior to running any dependent services (which is 'nfs-ganesha-config.service' here).

Please confirm if that is the case. Also is there any way to load 'EnvironmentFile' only after executing all the dependent services.

Thanks,
Soumya
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to