Webhuis / Cfengine-debian

Intermediate Debian repository for continous upgrade of Cfengine.
Other
8 stars 7 forks source link

the directory /var/run/cfengine3 must be created when we install the package #18

Closed basvandervlies closed 11 years ago

hspaans commented 11 years ago

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.

basvandervlies commented 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?

hspaans commented 11 years ago

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.

basvandervlies commented 11 years ago

@hspaans i will adjust the pid directory to /run/cfengine3 instead of /var/run/cfengine3. it is hard coded in the cfengine source

basvandervlies commented 11 years ago

see pull #20. Now we must adjust the init.d script to create the /run/cfengine3 directory

Webhuis commented 11 years ago

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 LinkedIn profileView Martin Simons's profile
basvandervlies commented 11 years ago

we must create an issue to adjust the init.d script to handle the /run/cfengine3 directory.

tzz commented 11 years ago

Hey guys, I would recommend to

I hope that's acceptable?

tzz commented 11 years ago

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 :)

tzz commented 11 years ago

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).

basvandervlies commented 11 years ago

@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.