# HG changeset patch # User Pascal Bellard # Date 1306576766 -7200 # Node ID 2ae8ee18aa855ff8f1d1c2c88a00c3dd6255698c # Parent 681609d4339d4db8b62d4343096e0e23f2c67706 restore nscd... diff -r 681609d4339d -r 2ae8ee18aa85 nscd/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nscd/receipt Sat May 28 11:59:26 2011 +0200 @@ -0,0 +1,21 @@ +# SliTaz package receipt. + +PACKAGE="nscd" +VERSION="2.13" +CATEGORY="base-system" +SHORT_DESC="passwd, group and host lookups cache." +WEB_SITE="http://gcc.gnu.org/" +WANTED="glibc" +MAINTAINER="pascal.bellard@slitaz.org" + +# Rules to gen a SliTaz package suitable for Tazpkg. +# +genpkg_rules() +{ + mkdir -p $fs/usr/sbin $fs/usr/bin $fs/etc/init.d $fs/var/db + cp $_pkg/usr/sbin/nscd $fs/usr/sbin/ + cp $_pkg/usr/bin/getent $fs/usr/bin/ + cp $src/nscd/nscd.conf $fs/etc + cp stuff/nscd $fs/etc/init.d + chmod +x $fs/etc/init.d/nscd +} diff -r 681609d4339d -r 2ae8ee18aa85 nscd/stuff/nscd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nscd/stuff/nscd Sat May 28 11:59:26 2011 +0200 @@ -0,0 +1,62 @@ +#!/bin/sh +# /etc/init.d/nscd : Start, stop and restart nscd server on SliTaz, at +# boot time or with the command line. +# +# To start nscd server at boot time, just put nscd in the $RUN_DAEMONS +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=nscd +DESC="Name Switch Cache Daemon" +DAEMON=/usr/sbin/nscd +OPTIONS=$NSCD_OPTIONS +PIDFILE=/var/run/nscd/nscd.pid + +[ -d /var/run/nscd ] || mkdir /var/run/nscd +[ -d /var/db/nscd ] || mkdir /var/db/nscd + +case "$1" in + start) + if active_pidfile $PIDFILE nscd ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + sleep 2 + ;; + stop) + if ! active_pidfile $PIDFILE nscd ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + sleep 2 + ;; + restart) + if ! active_pidfile $PIDFILE nscd ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + sleep 2 + $DAEMON $OPTIONS + status + sleep 2 + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart +]" + echo "" + exit 1 + ;; +esac + +exit 0