why doesn't rndc return exit status ?

Danny Mayer mayer at gis.net
Mon May 26 01:40:09 UTC 2008

Danny Thomas wrote:
> On 26/05/2008, at 2:40 AM, Evan Hunt wrote:
>>> BIND9 works asynchronously. It receives the request from rndc and works
>>> on it and completes it later. Otherwise it could take a long time for
>>> the request to complete. Take a request to reload a large zone. It may
>>> take a while.
>> True, but adding an option to have rndc wait for a reply before exiting
>> could be workable.
> my focus is an init script that does an rndc reconfig
> how can this be done robustly when
>     the command is asynchronous
>    doesn't return an indication of success/failure
> maybe "-S" : synchronous *and* returns operation status
> 0 status == rndc did not fail and operation was successful

My recommendation is that the rndc returns 0 if the request was 
successfully passed to named and then rndc status will tell you the 
progress of the command. named could keep, for example, the results of 
last 10 rndc requests and have that list returned on an rndc status 
request. A long wait for a reload for example is counterproductive.

Maybe you can tell us what this script is trying to accomplish so we can 
determine if there is a better solution?


More information about the bind-users mailing list