1 |
commit: 7df95ab46cf9636cdc9890430ed6709696fa4237 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 30 08:06:55 2017 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 30 08:08:06 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7df95ab4 |
7 |
|
8 |
app-misc/carbon-c-relay: revbump 3.1 to fix pidfile creation permission issues on some systems |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
...{carbon-c-relay-3.1.ebuild => carbon-c-relay-3.1-r1.ebuild} | 0 |
13 |
app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 | 3 --- |
14 |
app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 | 10 +++++++--- |
15 |
3 files changed, 7 insertions(+), 6 deletions(-) |
16 |
|
17 |
diff --git a/app-misc/carbon-c-relay/carbon-c-relay-3.1.ebuild b/app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild |
18 |
similarity index 100% |
19 |
rename from app-misc/carbon-c-relay/carbon-c-relay-3.1.ebuild |
20 |
rename to app-misc/carbon-c-relay/carbon-c-relay-3.1-r1.ebuild |
21 |
|
22 |
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 b/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 |
23 |
index 64e4ab5c832..5233eec2d2a 100644 |
24 |
--- a/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 |
25 |
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 |
26 |
@@ -4,9 +4,6 @@ |
27 |
# routing file to read |
28 |
#ROUTES_FILE=/etc/carbon-c-relay.conf |
29 |
|
30 |
-# where to store the PID-file |
31 |
-#PIDFILE=/run/carbon-c-relay.pid |
32 |
- |
33 |
# where to store the logfile |
34 |
#LOGFILE=/var/log/carbon-c-relay.log |
35 |
|
36 |
|
37 |
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 b/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 |
38 |
index 104a7e0878e..1e2734941cc 100644 |
39 |
--- a/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 |
40 |
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 |
41 |
@@ -13,7 +13,7 @@ routes_config=${ROUTES_FILE:-/etc/${SVCNAME}.conf} |
42 |
|
43 |
command="/usr/bin/carbon-c-relay" |
44 |
command_args="-f ${routes_config} ${EXTRA_OPTS}" |
45 |
-pidfile=${PIDFILE:-/run/${SVCNAME}.pid} |
46 |
+pidfile="/run/carbon-c-relay/${SVCNAME}.pid" |
47 |
logfile=${LOGFILE:-/var/log/${SVCNAME}.log} |
48 |
user=${USER:-carbon} |
49 |
group=${GROUP:-carbon} |
50 |
@@ -28,7 +28,8 @@ start_pre() { |
51 |
configtest || return 1 |
52 |
fi |
53 |
touch "${logfile}" |
54 |
- chown ${user}:${group} "${logfile}" |
55 |
+ mkdir -p "${pidfile%/*}" |
56 |
+ chown ${user}:${group} "${logfile}" "${pidfile%/*}" |
57 |
} |
58 |
|
59 |
stop_pre() { |
60 |
@@ -52,7 +53,10 @@ start() { |
61 |
|
62 |
stop() { |
63 |
ebegin "Stopping ${SVCNAME}" |
64 |
- start-stop-daemon --stop --exec ${command} --pidfile "${pidfile}" |
65 |
+ # migration path |
66 |
+ local pfile=${pidfile} |
67 |
+ [[ -e /run/carbon-c-relay.pid ]] && pfile="/run/carbon-c-relay.pid" |
68 |
+ start-stop-daemon --stop --exec ${command} --pidfile "${pfile}" |
69 |
eend $? |
70 |
} |