summaryrefslogtreecommitdiff
path: root/recipes/glibc/files/nscd-init.patch
blob: 884609a5a3aa729e342bde48ae5dc0b92b9c4eab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- nscd/nscd.init
+++ nscd/nscd.init
@@ -48,9 +48,8 @@
 
 start () {
     [ -d /var/run/nscd ] || mkdir /var/run/nscd
-    [ -d /var/db/nscd ] || mkdir /var/db/nscd
     echo -n $"Starting $prog: "
-    daemon /usr/sbin/nscd
+    /usr/sbin/nscd
     RETVAL=$?
     echo
     [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
@@ -67,12 +66,10 @@
 	# a non-privileged user
 	rm -f /var/run/nscd/nscd.pid
 	rm -f /var/run/nscd/socket
-       	success $"$prog shutdown"
-    else
-       	failure $"$prog shutdown"
     fi
-    echo
-    return $RETVAL
+    echo "Done."
+    # If nscd did not run, return 0 according to LSB.
+    return 0
 }
 
 restart() {
@@ -104,7 +101,8 @@
 	;;
     force-reload | reload)
     	echo -n $"Reloading $prog: "
-	killproc /usr/sbin/nscd -HUP
+	# Use killall, initscripts-1.0-r115 don't support -HUP yet.
+	killall -HUP /usr/sbin/nscd
 	RETVAL=$?
 	echo
 	;;