--- /etc/rc.d/dnsmasq 2011-09-11 18:04:31.000000000 +0200 +++ dnsmasq 2011-10-19 12:32:43.251481041 +0200 @@ -17,10 +17,15 @@ case $1 in start) stat_busy "Starting DNS/DHCP daemon" - if [[ -z $PID ]] && /usr/sbin/dnsmasq --test && - /usr/sbin/dnsmasq "--user=${DNSMASQ_USER:-nobody}" \ - "--pid-file=$pidfile" \ - "${DNSMASQ_OPTS[@]}"; then + # check process is running + if [[ ! -z $PID ]]; then + stat_fail + # check config is valid + elif ! /usr/sbin/dnsmasq --test &>/dev/null; then + /usr/sbin/dnsmasq --test + elif /usr/sbin/dnsmasq "--user=${DNSMASQ_USER:-nobody}" \ + "--pid-file=$pidfile" \ + "${DNSMASQ_OPTS[@]}"; then add_daemon dnsmasq stat_done else