;;
esac
done < /etc/nsswitch.conf`
- local pidfile="$(strings /usr/sbin/nscd | grep nscd.pid)"
- mkdir -p "$(dirname ${pidfile})"
- save_options pidfile "${pidfile}"
+ mkdir -p "$(dirname ${PIDFILE:-/var/run/nscd/nscd.pid})"
start-stop-daemon --start --quiet \
- --exec /usr/sbin/nscd --pidfile "${pidfile}" \
+ --exec /usr/sbin/nscd --pidfile "${PIDFILE:-/var/run/nscd/nscd.pid}" \
-- $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 ${pidfile}
+ start-stop-daemon --stop --quiet --exec /usr/sbin/nscd --pidfile "${PIDFILE:-/var/run/nscd/nscd.pid}"
eend $?
}