wok-4.x rev 10703

restore nscd...
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 28 11:59:26 2011 +0200 (2011-05-28)
parents 681609d4339d
children 2b34a21e299d
files nscd/receipt nscd/stuff/nscd
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nscd/receipt	Sat May 28 11:59:26 2011 +0200
     1.3 @@ -0,0 +1,21 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="nscd"
     1.7 +VERSION="2.13"
     1.8 +CATEGORY="base-system"
     1.9 +SHORT_DESC="passwd, group and host lookups cache."
    1.10 +WEB_SITE="http://gcc.gnu.org/"
    1.11 +WANTED="glibc"
    1.12 +MAINTAINER="pascal.bellard@slitaz.org"
    1.13 +
    1.14 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.15 +#
    1.16 +genpkg_rules()
    1.17 +{
    1.18 +	mkdir -p $fs/usr/sbin $fs/usr/bin $fs/etc/init.d $fs/var/db
    1.19 +	cp $_pkg/usr/sbin/nscd $fs/usr/sbin/
    1.20 +	cp $_pkg/usr/bin/getent $fs/usr/bin/
    1.21 +	cp $src/nscd/nscd.conf $fs/etc
    1.22 +	cp stuff/nscd $fs/etc/init.d
    1.23 +	chmod +x $fs/etc/init.d/nscd
    1.24 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/nscd/stuff/nscd	Sat May 28 11:59:26 2011 +0200
     2.3 @@ -0,0 +1,62 @@
     2.4 +#!/bin/sh
     2.5 +# /etc/init.d/nscd : Start, stop and restart nscd server on SliTaz, at
     2.6 +# boot time or with the command line.
     2.7 +#
     2.8 +# To start nscd server at boot time, just put nscd in the $RUN_DAEMONS
     2.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    2.10 +#
    2.11 +. /etc/init.d/rc.functions
    2.12 +. /etc/daemons.conf
    2.13 +
    2.14 +NAME=nscd
    2.15 +DESC="Name Switch Cache Daemon"
    2.16 +DAEMON=/usr/sbin/nscd
    2.17 +OPTIONS=$NSCD_OPTIONS
    2.18 +PIDFILE=/var/run/nscd/nscd.pid
    2.19 +
    2.20 +[ -d /var/run/nscd ] || mkdir /var/run/nscd
    2.21 +[ -d /var/db/nscd ] || mkdir /var/db/nscd
    2.22 +
    2.23 +case "$1" in
    2.24 +  start)
    2.25 +    if active_pidfile $PIDFILE nscd ; then
    2.26 +      echo "$NAME already running."
    2.27 +      exit 1
    2.28 +    fi
    2.29 +    echo -n "Starting $DESC: $NAME... "
    2.30 +    $DAEMON $OPTIONS
    2.31 +    status
    2.32 +    sleep 2
    2.33 +    ;;
    2.34 +  stop)
    2.35 +    if ! active_pidfile $PIDFILE nscd ; then
    2.36 +      echo "$NAME is not running."
    2.37 +      exit 1
    2.38 +    fi
    2.39 +    echo -n "Stopping $DESC: $NAME... "
    2.40 +    kill `cat $PIDFILE`
    2.41 +    status
    2.42 +    sleep 2
    2.43 +    ;;
    2.44 +  restart)
    2.45 +    if ! active_pidfile $PIDFILE nscd ; then
    2.46 +      echo "$NAME is not running."
    2.47 +      exit 1
    2.48 +    fi
    2.49 +    echo -n "Restarting $DESC: $NAME... "
    2.50 +    kill `cat $PIDFILE`
    2.51 +    sleep 2
    2.52 +    $DAEMON $OPTIONS
    2.53 +    status
    2.54 +    sleep 2
    2.55 +    ;;
    2.56 +  *)
    2.57 +    echo ""
    2.58 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart
    2.59 +]"
    2.60 +    echo ""
    2.61 +    exit 1
    2.62 +    ;;
    2.63 +esac
    2.64 +
    2.65 +exit 0