# HG changeset patch # User Pascal Bellard # Date 1230495718 0 # Node ID 413c5371f00168e27aa5d53a84e2d8ea8c6d94b1 # Parent d354b851e4e73c5bc33af82cb800ea1504a3d42d Add nscd diff -r d354b851e4e7 -r 413c5371f001 nscd/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nscd/receipt Sun Dec 28 20:21:58 2008 +0000 @@ -0,0 +1,19 @@ +# SliTaz package receipt. + +PACKAGE="nscd" +VERSION="2.7" +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/etc/init.d + cp $_pkg/usr/sbin/nscd $fs/usr/sbin/ + cp $src/nscd/nscd.conf $fs/etc + cp stuff/nscd $fs/etc/init.d +} diff -r d354b851e4e7 -r 413c5371f001 nscd/stuff/nscd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nscd/stuff/nscd Sun Dec 28 20:21:58 2008 +0000 @@ -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 [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + sleep 2 + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + status + sleep 2 + ;; + restart) + if [ ! -f $PIDFILE ] ; 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