# Source networking configuration
. /etc/sysconfig/network
+NAMED_OPT=""
+
# Try get config..
[ -f /etc/sysconfig/named ] && . /etc/sysconfig/named
# Sanity check
[ -e /etc/named.conf ] || exit 0
+[ -n "$NUM_CPUS" ] && NAMED_OPT="$NAMED_OPT -n $NUM_CPUS"
+
start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/named ]; then
touch $CHROOT_TO_DIR/named.log && \
chown named:named $CHROOT_TO_DIR/named.log
daemon named -u named -t $CHROOT_TO_DIR \
- -c /etc/named.conf -n ${NUM_CPUS:-1} </dev/null
+ -c /etc/named.conf $NAMED_OPT </dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/named
else
# Set nice level for named
SERVICE_RUN_NICE_LEVEL="+2"
-# Take advantage of SMP (default use 1 CPU)
-NUM_CPUS=1
+# Take advantage of SMP. If not set then named autodetects number of online CPUs
+# and runs that number of workers. You can force other value here.
+#NUM_CPUS=1