Skip to contentSkip to conversation

package/unscd: add PID file to init script

PATCH New Doug Kehn 2 participants 2 messages Dec 23, 2015

lore
Share & tools
lore

Doug Kehn

author
#0 lore raw

PATCH 1/1 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 <[email protected]>
---
 package/unscd/S46unscd | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/unscd/S46unscd +3 -2
index 7d18f94..6a51eec 100644
@@ -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)
Signature · 1 line
2.6.4
#1 lore raw

PATCH 1/1 package/unscd: add PID file to init script

Dear Doug Kehn,

Quoted 8 lines · Doug Kehn

unscd creates/manages it's own PID file. Pass PID file reference to start-stop-daemon.

Cc Thomas Petazzoni <[email protected]>
---
 package/unscd/S46unscd | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com