summaryrefslogtreecommitdiffstats
path: root/package/unscd
diff options
context:
space:
mode:
authorDoug Kehn <rdkehn@yahoo.com>2015-12-23 07:54:40 -0600
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-23 17:45:08 +0100
commitccf8ecd10fe2fe398ede6b297a5df19d6d69d8ae (patch)
tree14a25d48f67a4b9da1eb2beeed6d627183d9e38b /package/unscd
parent0afd34091698623ee0fba5930c38474792f4f0d5 (diff)
downloadbuildroot-ccf8ecd10fe2fe398ede6b297a5df19d6d69d8ae.tar.gz
buildroot-ccf8ecd10fe2fe398ede6b297a5df19d6d69d8ae.zip
package/unscd: add PID file to init script
unscd creates/manages it's own PID file. Pass PID file reference to start-stop-daemon. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Doug Kehn <rdkehn@yahoo.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/unscd')
-rw-r--r--package/unscd/S46unscd5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/unscd/S46unscd b/package/unscd/S46unscd
index 7d18f947c8..6a51eec130 100644
--- a/package/unscd/S46unscd
+++ b/package/unscd/S46unscd
@@ -2,16 +2,17 @@
NAME="nscd"
DAEMON="/usr/sbin/${NAME}"
+PID_F="/var/run/nscd/${NAME}.pid"
case "$1" in
start)
printf "Starting ${NAME}: "
- start-stop-daemon -S -x ${DAEMON}
+ start-stop-daemon -S -p ${PID_F} -x ${DAEMON}
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping ${NAME}: "
- start-stop-daemon -K -x ${DAEMON}
+ start-stop-daemon -K -p ${PID_F}
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
;;
restart|reload)
OpenPOWER on IntegriCloud