From a334319f6530564d22e775935d9c91663623a1b4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 22 Dec 2004 20:10:10 +0000 Subject: (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. --- nscd/nscd.init | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'nscd/nscd.init') diff --git a/nscd/nscd.init b/nscd/nscd.init index 1fba72f..d5c1cb9 100644 --- a/nscd/nscd.init +++ b/nscd/nscd.init @@ -9,18 +9,7 @@ # slow naming services like NIS, NIS+, LDAP, or hesiod. # processname: /usr/sbin/nscd # config: /etc/nscd.conf -# config: /etc/sysconfig/nscd # -### BEGIN INIT INFO -# Provides: nscd -# Required-Start: $syslog -# Default-Stop: 0 1 6 -# Short-Description: Starts the Name Switch Cache Daemon -# Description: This is a daemon which handles passwd and group lookups \ -# for running programs and cache the results for the next \ -# query. You should start this daemon if you use \ -# slow naming services like NIS, NIS+, LDAP, or hesiod. -### END INIT INFO # Sanity checks. [ -f /etc/nscd.conf ] || exit 0 @@ -29,8 +18,20 @@ # Source function library. . /etc/init.d/functions -# Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS. -[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd +# nscd does not run on any kernel lower than 2.2.0 because of threading +# problems, so we require that in first place. +case $(uname -r) in + 2.[2-9].*) + # this is okay + ;; + [3-9]*) + # these are of course also okay + ;; + *) + #this is not + exit 0 + ;; +esac RETVAL=0 prog=nscd @@ -46,7 +47,7 @@ start () { # fi # done echo -n $"Starting $prog: " - daemon /usr/sbin/nscd $secure $NSCD_OPTIONS + daemon /usr/sbin/nscd $secure RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd @@ -87,23 +88,21 @@ case "$1" in RETVAL=$? ;; status) - status nscd + status nscd RETVAL=$? - ;; + ;; restart) restart RETVAL=$? ;; - try-restart | condrestart) + condrestart) [ -e /var/lock/subsys/nscd ] && restart RETVAL=$? ;; - force-reload | reload) - echo -n $"Reloading $prog: " - killproc /usr/sbin/nscd -HUP + reload) + killproc /usr/sbin/nscd -HUP RETVAL=$? - echo - ;; + ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" RETVAL=1 -- cgit v1.1