Startup should create dir for pid file if it does not exists
|Assignee:||Jaime Melis||% Done:|
|Category:||Core & System|
|Target version:||Release 4.4|
|Affected Versions:||OpenNebula 4.2|
It is perfectly reasonable for a sysadmin to locate /var/run on a tmpfs, thus everything written will be deleted at reboot time. The startup script should check for the existence /var/run/one and create it if it is not present. It should not be expected that the sysadmin wrap the "one" startup script.
oned startup will fail if the directory is not present.
Similar arguments can be made for /var/log/one and /var/lock/one. However, neither should be located on tmpfs (to the best of my knowledge) and thus creation of /var/log/one and /var/lock/one can be left to packagers and sysadmins as this is a one time task.
The attached patch addresses this problem.
#5 Updated by Robert Schweikert almost 7 years ago
Could you please reconsider.
I am still building packages for SUSE Linux Enterprise and it uses sysV init and SLE 11 will be supported for another 5 years or so. Also there are other distributions that still use sysV init and this patch is useful for them as well.
Last but not least this is generally useful when setting up OpenNabula from scratch not using specific distribution packages.