Package: coquelicot
Version: 0.9.3-1
Tags: patch
Control: block -1 by 779828

This is another patch following from patch #779828. It tweaks the init-script
to ensure the /var/run subdir is present during service-start. This is needed
e.g. when when rebooting and /var/run is a tmpfs. It also fixes a copy-paste
typo from my previous patch which was chmodding the wrong directory.

-- 
Rowan Thorpe
PGP fingerprint:
 BB0A 0787 C0EE BDD8 7F97  3D30 49F2 13A5 265D CCBD
----
"There is a great difference between worry and concern. A worried person sees
a problem, and a concerned person solves a problem."
 - Harold Stephens
>From 582dbacb0aab0ca1825927abd5c445bea0eba138 Mon Sep 17 00:00:00 2001
From: Rowan Thorpe <ro...@rowanthorpe.com>
Date: Tue, 14 Apr 2015 20:32:41 +0300
Subject: [PATCH] Ensure Debian rundir presence

* Ensure existence of rundir from Debian initscript (needed e.g. after reboot
  when rundir is tmpfs)
* Fix typo in debian postinst
---
 debian/coquelicot.init.d   | 2 ++
 debian/coquelicot.postinst | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/coquelicot.init.d b/debian/coquelicot.init.d
index fbd7e2e..93beca1 100755
--- a/debian/coquelicot.init.d
+++ b/debian/coquelicot.init.d
@@ -37,6 +37,8 @@ GROUP='coquelicot'
 
 do_start()
 {
+	[ -e /var/run/$NAME ] || \
+		install -d -o$USER -g$GROUP -m755 /var/run/$NAME
 	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \
 		--chuid "${USER}:${GROUP}" > /dev/null \
 		|| return 1
diff --git a/debian/coquelicot.postinst b/debian/coquelicot.postinst
index 7611186..c2e4cd4 100755
--- a/debian/coquelicot.postinst
+++ b/debian/coquelicot.postinst
@@ -11,7 +11,7 @@ case "$1" in
 	fi
 	if ! dpkg-statoverride --list "/var/run/coquelicot"; then
 		chown coquelicot:coquelicot /var/run/coquelicot
-		chmod 755 /var/lib/coquelicot
+		chmod 755 /var/run/coquelicot
 	fi
 	if ! dpkg-statoverride --list "/var/lib/coquelicot"; then
 		chown coquelicot:coquelicot /var/lib/coquelicot
-- 
2.1.4

Reply via email to