summaryrefslogtreecommitdiffstats
path: root/debian/patches/ctdb-create-piddir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/ctdb-create-piddir.patch')
-rw-r--r--debian/patches/ctdb-create-piddir.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/ctdb-create-piddir.patch b/debian/patches/ctdb-create-piddir.patch
new file mode 100644
index 0000000..708f787
--- /dev/null
+++ b/debian/patches/ctdb-create-piddir.patch
@@ -0,0 +1,26 @@
+From: Michael Tokarev <mjt@tls.msk.ru>
+Date: Fri, 09 Sep 2022 12:49:55 +0300
+Subject: create ctdb pid directory
+
+(which is /run/ctdb/). Create it in the systemd service
+file (using RuntimeDirectory directive) and in the sysv-init
+script.
+
+diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init
+index 7fe8f0085ae..57fd0dda63d 100755
+--- a/ctdb/config/ctdb.init
++++ b/ctdb/config/ctdb.init
+@@ -78,4 +78,5 @@ start()
+ ;;
+ debian)
++ mkdir -p -m0755 ${pidfile%/*}
+ eval start-stop-daemon --start --quiet --background --exec "$ctdbd"
+ ;;
+diff --git a/packaging/systemd/ctdb.service.in b/packaging/systemd/ctdb.service.in
+index 7905a93e242..eefc7468a44 100644
+--- a/packaging/systemd/ctdb.service.in
++++ b/packaging/systemd/ctdb.service.in
+@@ -12,2 +12,3 @@ TasksMax=4096
+ PIDFile=@CTDB_RUNDIR@/ctdbd.pid
++RuntimeDirectory=ctdb
+ ExecStart=@SBINDIR@/ctdbd