diff --git a/srcpkgs/glibc/files/nscd.conf b/srcpkgs/glibc/files/nscd.conf new file mode 100644 index 0000000000..0745f8cc69 --- /dev/null +++ b/srcpkgs/glibc/files/nscd.conf @@ -0,0 +1,9 @@ +# Configuration file for nscd(8). +# +logfile /var/log/nscd.log +debug-level 1 +server-user nobody +enable-cache passwd yes +enable-cache group yes +enable-cache hosts yes +enable-cache services yes diff --git a/srcpkgs/glibc/files/nscd.logrotate b/srcpkgs/glibc/files/nscd.logrotate new file mode 100644 index 0000000000..02b289006d --- /dev/null +++ b/srcpkgs/glibc/files/nscd.logrotate @@ -0,0 +1,5 @@ +/var/log/nscd.log { + sharedscripts + copytruncate + missingok +} diff --git a/srcpkgs/glibc/files/nscd.rc b/srcpkgs/glibc/files/nscd.rc new file mode 100644 index 0000000000..0edee769f0 --- /dev/null +++ b/srcpkgs/glibc/files/nscd.rc @@ -0,0 +1,23 @@ +#!/sbin/runscript + +command=/usr/sbin/nscd +pidfile=/var/run/nscd/nscd.pid + +depend() +{ + use dns ldap net slapd +} + +start_pre() +{ + if [ ! -d /var/run/nscd ]; then + mkdir -p /var/run/nscd + fi +} + +stop() +{ + ebegin "Stopping nscd" + ${command} -K + eend $? +} diff --git a/srcpkgs/glibc/nscd.template b/srcpkgs/glibc/nscd.template new file mode 100644 index 0000000000..b309a7ae9d --- /dev/null +++ b/srcpkgs/glibc/nscd.template @@ -0,0 +1,21 @@ +# Template file for 'nscd'. +# +short_desc="Name Service Cache Daemon" +long_desc=" + This package contains nscd, a daemon that provides a cache for the + most common name service requests." + +openrc_services="nscd default" +conf_files="/etc/nscd.conf" + +Add_dependency run glibc + +do_install() +{ + install -d ${DESTDIR}/usr/sbin + mv ${SRCPKGDESTDIR}/usr/sbin/nscd ${DESTDIR}/usr/sbin + install -D -m755 ${FILESDIR}/nscd.rc ${DESTDIR}/etc/init.d/nscd + install -D -m644 ${FILESDIR}/nscd.conf ${DESTDIR}/etc + install -D -m644 ${FILESDIR}/nscd.logrotate \ + ${DESTDIR}/etc/logrotate.d/nscd +} diff --git a/srcpkgs/glibc/template b/srcpkgs/glibc/template index f44d8dcb66..281df2f8dd 100644 --- a/srcpkgs/glibc/template +++ b/srcpkgs/glibc/template @@ -1,7 +1,7 @@ # Template file for 'glibc' pkgname=glibc version=2.11 -revision=1 +revision=2 distfiles="http://ftp.gnu.org/gnu/glibc/glibc-${version}.tar.bz2" build_style=gnu_configure configure_script="../configure" @@ -24,7 +24,7 @@ long_desc=" essential=yes base_chroot=yes conf_files="/etc/rpc /etc/ld.so.conf /etc/nsswitch.conf" -subpackages="glibc-devel glibc-locales" +subpackages="glibc-devel glibc-locales nscd" Add_dependency build gcc Add_dependency build kernel-libc-headers diff --git a/srcpkgs/nscd b/srcpkgs/nscd new file mode 120000 index 0000000000..0c4c137d7c --- /dev/null +++ b/srcpkgs/nscd @@ -0,0 +1 @@ +glibc \ No newline at end of file