public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/musl-nscd/files/
@ 2017-06-26 19:03 Daniel Kuehn
  0 siblings, 0 replies; only message in thread
From: Daniel Kuehn @ 2017-06-26 19:03 UTC (permalink / raw
  To: gentoo-commits

commit:     9f65807a31384fa03c6e587402139aaaba0bc20a
Author:     Daniel Kuehn <lejonet <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 26 18:59:09 2017 +0000
Commit:     Daniel Kuehn <lejonet <AT> gentoo <DOT> org>
CommitDate: Mon Jun 26 19:00:53 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f65807a

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

 sys-libs/musl-nscd/files/nscd.initd | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/sys-libs/musl-nscd/files/nscd.initd b/sys-libs/musl-nscd/files/nscd.initd
index 929d1016df7..1bf83e7808a 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 $?
 }
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-26 19:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26 19:03 [gentoo-commits] repo/gentoo:master commit in: sys-libs/musl-nscd/files/ Daniel Kuehn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox