1 |
commit: 9f65807a31384fa03c6e587402139aaaba0bc20a |
2 |
Author: Daniel Kuehn <lejonet <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 26 18:59:09 2017 +0000 |
4 |
Commit: Daniel Kuehn <lejonet <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 26 19:00:53 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f65807a |
7 |
|
8 |
sys-libs/musl-nscd: Fix initscript |
9 |
|
10 |
Fix initscript to reference PIDFILE variable from conf.d config instead |
11 |
of trying to do a subshell that is grepping strings of the binary |
12 |
|
13 |
sys-libs/musl-nscd/files/nscd.initd | 10 +++------- |
14 |
1 file changed, 3 insertions(+), 7 deletions(-) |
15 |
|
16 |
diff --git a/sys-libs/musl-nscd/files/nscd.initd b/sys-libs/musl-nscd/files/nscd.initd |
17 |
index 929d1016df7..1bf83e7808a 100644 |
18 |
--- a/sys-libs/musl-nscd/files/nscd.initd |
19 |
+++ b/sys-libs/musl-nscd/files/nscd.initd |
20 |
@@ -43,20 +43,16 @@ start() { |
21 |
;; |
22 |
esac |
23 |
done < /etc/nsswitch.conf` |
24 |
- local pidfile="$(strings /usr/sbin/nscd | grep nscd.pid)" |
25 |
- mkdir -p "$(dirname ${pidfile})" |
26 |
- save_options pidfile "${pidfile}" |
27 |
+ mkdir -p "$(dirname ${PIDFILE:-/var/run/nscd/nscd.pid})" |
28 |
start-stop-daemon --start --quiet \ |
29 |
- --exec /usr/sbin/nscd --pidfile "${pidfile}" \ |
30 |
+ --exec /usr/sbin/nscd --pidfile "${PIDFILE:-/var/run/nscd/nscd.pid}" \ |
31 |
-- $secure |
32 |
eend $? |
33 |
} |
34 |
|
35 |
stop() { |
36 |
- local pidfile="$(get_options pidfile)" |
37 |
- [ -n "${pidfile}" ] && pidfile="--pidfile ${pidfile}" |
38 |
ebegin "Shutting down Name Service Cache Daemon" |
39 |
- start-stop-daemon --stop --quiet --exec /usr/sbin/nscd ${pidfile} |
40 |
+ start-stop-daemon --stop --quiet --exec /usr/sbin/nscd --pidfile "${PIDFILE:-/var/run/nscd/nscd.pid}" |
41 |
eend $? |
42 |
} |