Debian policy allows the system to have /var/run and /var/lock on ramdisks. It is thus not acceptable for a package to include subdirectories in those directories. Instead, the directories should be created in init.d scripts.
In the current version of debian testing the /var/run and /var/lock directories are recreated at each boot (this is part of the migration from /var/run to /run). This means that the koha directories are not available after each boot. I fixed this issue by modifying the /etc/init.d/koha-common script as follows.
--- koha-common.orig 2011-07-22 11:07:58.000000000 +1000
+++ koha-common 2011-07-22 11:06:43.000000000 +1000
@@ -42,6 +42,8 @@
+ # We insure all required directories exist, including disabled ones.
+ koha-create-dirs $(koha-list)
koha-start-zebra $(koha-list --enabled)
This will have the nice side effect of fixing installations on Ubuntu that refuse to come up after boot. I'll have a look to make sure there's nothing funny that this would cause, but I expect it'll be a quick signoff.
Created attachment 4707 [details] [review]
Bug 4873 - Ensure that the required directories exist on init
As systems (Ubuntu already, Debian testing is doing it too) move to
ramdisking /var/run and /var/lock, or otherwise clearing them on boot,
we need to ensure that they're there when we need them. This patch
autocreates any directories that are missing when the init script runs.
Signed-off-by: Robin Sheat <firstname.lastname@example.org>
Patch for packages, pushed
Patch is in both master and 3.4.x (and has been for a while now.)