summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kuehn <lejonet@gentoo.org>2017-06-26 20:59:09 +0200
committerDaniel Kuehn <lejonet@gentoo.org>2017-06-26 21:00:53 +0200
commit9f65807a31384fa03c6e587402139aaaba0bc20a (patch)
treecddc207b0774df4a555c424269d046d14d036826 /sys-libs/musl-nscd
parentnet-misc/gerbera: Add missing ipv6 flag dep on libupnp. (diff)
downloadgentoo-9f65807a31384fa03c6e587402139aaaba0bc20a.tar.gz
gentoo-9f65807a31384fa03c6e587402139aaaba0bc20a.tar.bz2
gentoo-9f65807a31384fa03c6e587402139aaaba0bc20a.zip
sys-libs/musl-nscd: Fix initscript
Fix initscript to reference PIDFILE variable from conf.d config instead of trying to do a subshell that is grepping strings of the binary
Diffstat (limited to 'sys-libs/musl-nscd')
-rw-r--r--sys-libs/musl-nscd/files/nscd.initd10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys-libs/musl-nscd/files/nscd.initd b/sys-libs/musl-nscd/files/nscd.initd
index 929d1016df79..1bf83e7808af 100644
--- a/sys-libs/musl-nscd/files/nscd.initd
+++ b/sys-libs/musl-nscd/files/nscd.initd
@@ -43,20 +43,16 @@ start() {
;;
esac
done < /etc/nsswitch.conf`
- local pidfile="$(strings /usr/sbin/nscd | grep nscd.pid)"
- mkdir -p "$(dirname ${pidfile})"
- save_options pidfile "${pidfile}"
+ mkdir -p "$(dirname ${PIDFILE:-/var/run/nscd/nscd.pid})"
start-stop-daemon --start --quiet \
- --exec /usr/sbin/nscd --pidfile "${pidfile}" \
+ --exec /usr/sbin/nscd --pidfile "${PIDFILE:-/var/run/nscd/nscd.pid}" \
-- $secure
eend $?
}
stop() {
- local pidfile="$(get_options pidfile)"
- [ -n "${pidfile}" ] && pidfile="--pidfile ${pidfile}"
ebegin "Shutting down Name Service Cache Daemon"
- start-stop-daemon --stop --quiet --exec /usr/sbin/nscd ${pidfile}
+ start-stop-daemon --stop --quiet --exec /usr/sbin/nscd --pidfile "${PIDFILE:-/var/run/nscd/nscd.pid}"
eend $?
}