mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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
This commit is contained in:
@@ -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 $?
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user