KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /etc/rc.d/rc3.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //etc/rc.d/rc3.d/K74nscd
#!/bin/bash
#
# nscd:		Starts the Name Switch Cache Daemon
#
# chkconfig: - 30 74
# 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.
# 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
[ -x /usr/sbin/nscd ] || exit 0

# 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

RETVAL=0
prog=nscd

start () {
    [ -d /var/run/nscd ] || mkdir /var/run/nscd
    [ -d /var/db/nscd ] || mkdir /var/db/nscd
    secure=""
#   for table in passwd group hosts
#   do
#   	if egrep -q '^'$table':.*nisplus' /etc/nsswitch.conf; then
#   	    /usr/lib/nscd_nischeck $table || secure="$secure -S $table,yes"
#   	fi
#   done
    echo -n $"Starting $prog: "
    daemon /usr/sbin/nscd $secure $NSCD_OPTIONS
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
    return $RETVAL
}

stop () {
    echo -n $"Stopping $prog: "
    /usr/sbin/nscd -K
    RETVAL=$?
    if [ $RETVAL -eq 0 ]; then
       	rm -f /var/lock/subsys/nscd
	# nscd won't be able to remove these if it is running as
	# 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
}

restart() {
    stop
    start
}

# See how we were called.
case "$1" in
    start)
	[ -e /var/lock/subsys/nscd ] || start
	RETVAL=$?
	;;
    stop)
	[ ! -e /var/lock/subsys/nscd ] || stop
	RETVAL=$?
	;;
    status)
	status nscd
	RETVAL=$?
	;;
    restart)
	restart
	RETVAL=$?
	;;
    try-restart | condrestart)
	[ -e /var/lock/subsys/nscd ] && restart
	RETVAL=$?
	;;
    force-reload | reload)
    	echo -n $"Reloading $prog: "
	killproc /usr/sbin/nscd -HUP
	RETVAL=$?
	echo
	;;
    *)
	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
	RETVAL=1
	;;
esac
exit $RETVAL

Anon7 - 2021