1 |
commit: 2fa0f1ef8f496d84505158682083789a82611df3 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 24 01:03:09 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 24 01:03:26 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fa0f1ef |
7 |
|
8 |
net-misc/tor: update openrc init scripts, bug #593794 |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
net-misc/tor/files/tor.initd-r8 | 42 ++++++++++++++++++++++ |
13 |
.../{tor-0.2.8.8.ebuild => tor-0.2.8.8-r1.ebuild} | 2 +- |
14 |
....3_alpha.ebuild => tor-0.2.9.3_alpha-r1.ebuild} | 2 +- |
15 |
3 files changed, 44 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/net-misc/tor/files/tor.initd-r8 b/net-misc/tor/files/tor.initd-r8 |
18 |
new file mode 100644 |
19 |
index 00000000..e1f6c59 |
20 |
--- /dev/null |
21 |
+++ b/net-misc/tor/files/tor.initd-r8 |
22 |
@@ -0,0 +1,42 @@ |
23 |
+#!/sbin/openrc-run |
24 |
+# Copyright 1999-2016 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+# $Id$ |
27 |
+ |
28 |
+command=/usr/bin/tor |
29 |
+pidfile=/var/run/tor/tor.pid |
30 |
+command_args="--hush --runasdaemon 1 --pidfile \"${pidfile}\"" |
31 |
+retry=${GRACEFUL_TIMEOUT:-60} |
32 |
+ |
33 |
+extra_commands="checkconfig" |
34 |
+extra_started_commands="reload" |
35 |
+description="Anonymizing overlay network for TCP" |
36 |
+description_checkconfig="Check for valid config file" |
37 |
+description_reload="Reload the configuration" |
38 |
+ |
39 |
+checkconfig() { |
40 |
+ ${command} --verify-config --hush > /dev/null 2>&1 |
41 |
+ if [ $? -ne 0 ] ; then |
42 |
+ eerror "Tor configuration (/etc/tor/torrc) is not valid." |
43 |
+ eerror "Example is in /etc/tor/torrc.sample" |
44 |
+ return 1 |
45 |
+ fi |
46 |
+} |
47 |
+ |
48 |
+start_pre() { |
49 |
+ checkconfig || return 1 |
50 |
+ checkpath -d -m 0755 -o tor:tor /var/run/tor |
51 |
+} |
52 |
+ |
53 |
+stop() { |
54 |
+ ebegin "Stopping Tor (waiting up to ${retry} seconds)" |
55 |
+ start-stop-daemon -K -s INT -R ${retry} -P -p ${pidfile} |
56 |
+ eend $? |
57 |
+} |
58 |
+ |
59 |
+reload() { |
60 |
+ checkconfig || return 1 |
61 |
+ ebegin "Reloading Tor configuration" |
62 |
+ start-stop-daemon -s HUP --pidfile ${pidfile} |
63 |
+ eend $? |
64 |
+} |
65 |
|
66 |
diff --git a/net-misc/tor/tor-0.2.8.8.ebuild b/net-misc/tor/tor-0.2.8.8-r1.ebuild |
67 |
similarity index 98% |
68 |
rename from net-misc/tor/tor-0.2.8.8.ebuild |
69 |
rename to net-misc/tor/tor-0.2.8.8-r1.ebuild |
70 |
index aeefa9f..ee36db7 100644 |
71 |
--- a/net-misc/tor/tor-0.2.8.8.ebuild |
72 |
+++ b/net-misc/tor/tor-0.2.8.8-r1.ebuild |
73 |
@@ -69,7 +69,7 @@ src_install() { |
74 |
readme.gentoo_create_doc |
75 |
|
76 |
newconfd "${FILESDIR}"/tor.confd tor |
77 |
- newinitd "${FILESDIR}"/tor.initd-r7 tor |
78 |
+ newinitd "${FILESDIR}"/tor.initd-r8 tor |
79 |
systemd_dounit "${FILESDIR}/${PN}.service" |
80 |
systemd_dotmpfilesd "${FILESDIR}/${PN}.conf" |
81 |
|
82 |
|
83 |
diff --git a/net-misc/tor/tor-0.2.9.3_alpha.ebuild b/net-misc/tor/tor-0.2.9.3_alpha-r1.ebuild |
84 |
similarity index 98% |
85 |
rename from net-misc/tor/tor-0.2.9.3_alpha.ebuild |
86 |
rename to net-misc/tor/tor-0.2.9.3_alpha-r1.ebuild |
87 |
index 0f889a9..cd286ff 100644 |
88 |
--- a/net-misc/tor/tor-0.2.9.3_alpha.ebuild |
89 |
+++ b/net-misc/tor/tor-0.2.9.3_alpha-r1.ebuild |
90 |
@@ -67,7 +67,7 @@ src_install() { |
91 |
readme.gentoo_create_doc |
92 |
|
93 |
newconfd "${FILESDIR}"/tor.confd tor |
94 |
- newinitd "${FILESDIR}"/tor.initd-r7 tor |
95 |
+ newinitd "${FILESDIR}"/tor.initd-r8 tor |
96 |
systemd_dounit "${FILESDIR}/${PN}.service" |
97 |
systemd_dotmpfilesd "${FILESDIR}/${PN}.conf" |