diff options
author | 2007-03-04 09:39:09 +0000 | |
---|---|---|
committer | 2007-03-04 09:39:09 +0000 | |
commit | 6ac62707e61043ba8341937aeea1081a1d098348 (patch) | |
tree | 388b712eb7a24ff7213d8d493eeff24872498fac /hardened/toolchain/branches/pieworld/sys-libs/glibc/files/nscd | |
parent | Updates for xorg-server-1.1.1-r4 from gentoo-x86 (diff) | |
download | kevquinn-6ac62707e61043ba8341937aeea1081a1d098348.tar.gz kevquinn-6ac62707e61043ba8341937aeea1081a1d098348.tar.bz2 kevquinn-6ac62707e61043ba8341937aeea1081a1d098348.zip |
Align with gentoo-x86 3 Mar 2007
svn path=/; revision=185
Diffstat (limited to 'hardened/toolchain/branches/pieworld/sys-libs/glibc/files/nscd')
-rwxr-xr-x | hardened/toolchain/branches/pieworld/sys-libs/glibc/files/nscd | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/hardened/toolchain/branches/pieworld/sys-libs/glibc/files/nscd b/hardened/toolchain/branches/pieworld/sys-libs/glibc/files/nscd index a683e8f..b102de0 100755 --- a/hardened/toolchain/branches/pieworld/sys-libs/glibc/files/nscd +++ b/hardened/toolchain/branches/pieworld/sys-libs/glibc/files/nscd @@ -1,18 +1,18 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nscd,v 1.6 2006/06/18 06:49:50 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nscd,v 1.7 2007/02/23 12:09:39 uberlord Exp $ depend() { use dns ldap net slapd } checkconfig() { - if [[ ! -d /var/run/nscd ]] ; then + if [ ! -d /var/run/nscd ] ; then mkdir -p /var/run/nscd chmod 755 /var/run/nscd fi - if [[ -z ${NSCD_PERMS_OK} && $(stat -c %a /var/run/nscd) != "755" ]] ; then + if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "755" ] ; then echo "" ewarn "nscd run dir is not world readable, you should reset the perms:" ewarn "chmod 755 /var/run/nscd" @@ -46,15 +46,18 @@ start() { done < /etc/nsswitch.conf` local pidfile="$(strings /usr/sbin/nscd | grep nscd.pid)" mkdir -p "$(dirname ${pidfile})" + save_options pidfile "${pidfile}" start-stop-daemon --start --quiet \ - --exec /usr/sbin/nscd --pid ${pidfile} \ + --exec /usr/sbin/nscd --pidfile "${pidfile}" \ -- $secure eend $? } stop() { + local pidfile="$(get_options pidfile)" + [ -n "${pidfile}" ] && pidfile="--pidfile ${pidfile}" ebegin "Shutting down Name Service Cache Daemon" - start-stop-daemon --stop --quiet --exec /usr/sbin/nscd + start-stop-daemon --stop --quiet --exec /usr/sbin/nscd ${pidfile} eend $? } |