File: ctdb-create-piddir.patch

package info (click to toggle)
samba 2%3A4.23.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 188,292 kB
  • sloc: ansic: 2,006,966; python: 272,597; sh: 72,188; xml: 51,608; perl: 36,088; makefile: 6,353; yacc: 5,320; exp: 1,582; lex: 1,504; cpp: 1,224; awk: 589; java: 119; csh: 58; pascal: 54; sed: 45; asm: 30
file content (26 lines) | stat: -rw-r--r-- 872 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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