Closed basvandervlies closed 11 years ago
@hspaans thanks for the comment. so we must adjust the init.d script to create the '/var/run/cfengine3' or /run/cfengine3?
If cfengine3 packages depend on initscripts (>= 2.88dsf-13.3), then /run exists and you can go for /run directly otherwise /var/run is a safe alternative. But Wheezy and later will have /run. For Ubuntu I'm not sure which version will start to support /run, but if I'm not mistaken it was 11.10.
@hspaans i will adjust the pid directory to /run/cfengine3 instead of /var/run/cfengine3. it is hard coded in the cfengine source
see pull #20. Now we must adjust the init.d script to create the /run/cfengine3 directory
Dear Bas,
see pull #20. Now we must adjust the init.d script to create the /run/cfengine3 directory
Pull request #18 should bedropped, I suppose?
I would like to merge issues #16, #17 and #19 by 16:00 CEST. If any of you have objections, please let me know.
Met vriendelijke groet, Martin.
+31651567029
View Martin Simons's profilewe must create an issue to adjust the init.d script to handle the /run/cfengine3 directory.
Hey guys, I would recommend to
sys.piddir
so it's also accessible from policy)I hope that's acceptable?
Here are the relevant parts of the core:
cf-execd/cf-execd.c: WritePID("cf-execd.pid");
cf-monitord/env_monitor.c:#include "generic_agent.h" // WritePID
cf-monitord/env_monitor.c: WritePID("cf-monitord.pid");
cf-serverd/cf-serverd-functions.c: WritePID("cf-serverd.pid");
libpromises/generic_agent.c:void WritePID(char *filename)
libpromises/generic_agent.h:void WritePID(char *filename);
libpromises/generic_agent.c:static void CleanPidFile(void)
libpromises/generic_agent.c: RegisterAtExitFunction(&CleanPidFile);
But there may be more places... I don't see where cf-agent does it because it has no PID file :)
If the above can be expressed as a cfengine/core.git pull request, I will see about merging it for the next major release (for 3.5.2 it will have to be patched here regardless, not in core.git, but I can see if the change can be backported to the 3.5.x branch for a potential 3.5.3 release).
@tzz then it will be configure option. In the debian release there are a lof of init.d scripts that create the /run directory and not the software.
Please reconsider this change as /var/run will be cleaned after a reboot. See https://wiki.debian.org/ReleaseGoals/RunDirectory?highlight=%28%2Frun%29#Packages_using_.2Fvar.2Frun_and_.2Fvar.2Flock for more information. If a package requires a subdir in /var/run it needs to be created when the application starts.