diff options
author | Daniel Kuehn <lejonet@gentoo.org> | 2017-06-26 20:59:09 +0200 |
---|---|---|
committer | Daniel Kuehn <lejonet@gentoo.org> | 2017-06-26 21:00:53 +0200 |
commit | 9f65807a31384fa03c6e587402139aaaba0bc20a (patch) | |
tree | cddc207b0774df4a555c424269d046d14d036826 /sys-libs | |
parent | net-misc/gerbera: Add missing ipv6 flag dep on libupnp. (diff) | |
download | gentoo-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')
-rw-r--r-- | sys-libs/musl-nscd/files/nscd.initd | 10 |
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 $? } |