Centos named init script

Jon Kibler jon.r.kibler at gmail.com
Thu Jul 17 19:21:49 UTC 2008


All,

I just spent several hours trying to track down a problem that was
logged to syslog as a 'named' issue, when in reality it is a
'named-checkconf' problem. A minor change to the named init script
would have saved me a few hours of going down the wrong path.

In the version of the init script I have (which has a few earlier
local changes, so I cannot give line numbers), the last part of the
start() function reads:
           named_err="`${EXEDIR}/named-checkconf $ckcf_options
$named_conf 2>&1`";
           echo
           echo $"Error in named configuration"':';
           echo "$named_err";
           failure
           echo
           if [ -x /usr/bin/logger ]; then
               echo "$named_err" | /usr/bin/logger -pdaemon.error -tnamed
           fi;
           return $RETVAL;
        fi;
        [ $RETVAL -eq 0 ] && touch ${VARLOCK}
        echo
        return $RETVAL
}
stop() {
...

The change I would recommend is to change
         echo "$named_err" | /usr/bin/logger -pdaemon.error -tnamed
to
         echo "$named_err" | /usr/bin/logger -pdaemon.error -tnamed-checkconf

Yes, this is a minor change, but one that could save others some time
in debugging.

My $0.02 worth.

Jon Kibler
--
Jon R. Kibler
Chief Technical Officer
A.S.E.T., Inc.
Charleston, SC USA
o: 843-849-8214


More information about the bind-users mailing list