Centos named init script

Kevin Darcy kcd at chrysler.com
Thu Jul 17 23:55:46 UTC 2008


Jon Kibler wrote:
> 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.
>
>   
named and named-checkconf share parsing routines and are part of the 
same subsystem.

How would you have debugged differently if the tag had been 
"named-checkconf"?

                                                                         
                     - Kevin



More information about the bind-users mailing list