Re: bind as a service on windows -c option not working
On 12/15/2011 5:52 AM, Vbvbrj wrote: On 15.12.2011 03:11, Danny Mayer wrote: On 12/14/2011 2:35 PM, Vbvbrj wrote: Bind 9.8.1 P1 installed in D:\bind9. Config files and other zone files and log files in D:\bind_config Service configuration: Path to executable D:\bind9\bin\named.exe -c D:\bind_config\etc\named.conf I haven't looked at this part of the code in a long time but it should work. Though the registry key should be ImagePath. Did you use BINDInstall to install it? Yes I used BINDInstall to install the service, and then modified the service to add the -coption. That's fine. This was one unimplemented feature for BINDInstall. named.conf has the line: directory D:\named.conf; Unless you actually have a folder called D:\named.conf\ then I suspect this is wrong. It should be the directory containing your files not the name of the config file. Oh, this is my error. The line is: directory D:\bind_config Is there a reason that you want to look for it in a different place from where it is currently looking? What's the real issue behind your question. Danny I want to keep all the files related to bind in one folder, not across the system folder. And keeping the named.conf in the system32 folder may be lost when the system is reinstalled and in a hurry the file is forgotten to be copied. If you install the software in D:\bind9 then the binaries will be in D:\bind9\bin and the config file named.conf will be in D:\bind9\etc. I don't think you need anything else. And the other thing is keeping the system's registry as simple and clean as possible, by not using registry for start-up arguments and indicating them in the command line for the service. This I managed to do for most of the services I use. If you do the above then you don't need to change anything in the registry. That's the default behavior. If there are changes you want to have added send a message to bind9-bugs. Danny ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind as a service on windows -c option not working
On 12/15/2011 11:43 AM, Vbvbrj wrote: On 15.12.2011 15:39, Danny Mayer wrote: Thanks for answering. I want to keep all the files related to bind in one folder, not across the system folder. And keeping the named.conf in the system32 folder may be lost when the system is reinstalled and in a hurry the file is forgotten to be copied. If you install the software in D:\bind9 then the binaries will be in D:\bind9\bin and the config file named.conf will be in D:\bind9\etc. I don't think you need anything else. The production I use for now is configured like you wrote^ all files under the install directory. And the other thing is keeping the system's registry as simple and clean as possible, by not using registry for start-up arguments and indicating them in the command line for the service. This I managed to do for most of the services I use. If you do the above then you don't need to change anything in the registry. That's the default behavior. If there are changes you want to have added send a message to bind9-bugs. This is the problem. If the InstallDir key is deleted from the registry, the bind at start searches for the named.conf in the system32\etc folder and falls with an error. That's why I asked about the -c option that is not taken. If without that regystry key, the bind service will try to find a named.conf under the etc folder from where the executable resides - will be easier. For example PHP is searching for the ini file in systme32 folder, then in the executable folder, then in paths. InstallDir is required in the registry for proper administration of BIND9. Danny ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind as a service on windows -c option not working
On 12/14/2011 2:35 PM, Vbvbrj wrote: Bind 9.8.1 P1 installed in D:\bind9. Config files and other zone files and log files in D:\bind_config Service configuration: Path to executable D:\bind9\bin\named.exe -c D:\bind_config\etc\named.conf I haven't looked at this part of the code in a long time but it should work. Though the registry key should be ImagePath. Did you use BINDInstall to install it? named.conf has the line: directory D:\named.conf; Unless you actually have a folder called D:\named.conf\ then I suspect this is wrong. It should be the directory containing your files not the name of the config file. If the registry key HKEY_LOCAL_MACHINE\SOFTWARE\ISC\BIND\InstallDir is present, then at the start the named.conf is searched under the folder etc of InstallDir folder. If I delete this key, the the named.conf file is searched in system32/etc folder or something under system32 folder. Yes. that's what it's designed to do. In both cases the -c option is not taken by the service. Debugging this is not easy but having the arguments on the ImagePath registry should be okay. As starting bind from command line, the -c option is taken in account and named.conf is read from the specified path. That's expected. How to tell the named running as a service to read the config file from the path specified with -c option? Some one please. Is there a reason that you want to look for it in a different place from where it is currently looking? What's the real issue behind your question. Danny ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind as a service on windows -c option not working
On 09.12.2011 22:54, wbr...@e1b.org wrote: This is not the answer I am looking. If the parameter exists, it's must working. Have you tried issuing the command from a command prompt? Yes, as I wrote, from the command line the -c option is invoked and the bind is loading the indicated file. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind as a service on windows -c option not working
How to tell the named running as a service to read the config file from the path specified with -c option? Try changing path to executable by moving quote: D:\bind9\bin\named.exe -c D:\bind_config\etc\named.conf Confidentiality Notice: This electronic message and any attachments may contain confidential or privileged information, and is intended only for the individual or entity identified above as the addressee. If you are not the addressee (or the employee or agent responsible to deliver it to the addressee), or if this message has been addressed to you in error, you are hereby notified that you may not copy, forward, disclose or use any part of this message or any attachments. Please notify the sender immediately by return e-mail or telephone and delete this message from your system. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind as a service on windows -c option not working
On 09.12.2011 21:32, wbr...@e1b.org wrote: How to tell the named running as a service to read the config file from the path specified with -c option? Try changing path to executable by moving quote: D:\bind9\bin\named.exe -c D:\bind_config\etc\named.conf No luck: The following information is part of the event: none:0: open: C:\WINDOWS\system32\etc\named.conf: file not found ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind as a service on windows -c option not working
No luck: The following information is part of the event: none:0: open: C:\WINDOWS\system32\etc\named.conf: file not found So why not put the configuration file there. Then use the directory option to direct BIND to look for all the zone files on the D: drive. options { directory D:\bind_config; other options as required } Confidentiality Notice: This electronic message and any attachments may contain confidential or privileged information, and is intended only for the individual or entity identified above as the addressee. If you are not the addressee (or the employee or agent responsible to deliver it to the addressee), or if this message has been addressed to you in error, you are hereby notified that you may not copy, forward, disclose or use any part of this message or any attachments. Please notify the sender immediately by return e-mail or telephone and delete this message from your system. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind as a service on windows -c option not working
On 09.12.2011 22:15, wbr...@e1b.org wrote: No luck: The following information is part of the event: none:0: open: C:\WINDOWS\system32\etc\named.conf: file not found So why not put the configuration file there. Then use the directory option to direct BIND to look for all the zone files on the D: drive. options { directory D:\bind_config; other options as required } This is not the answer I am looking. If the parameter exists, it's must working. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: bind as a service on windows -c option not working
This is not the answer I am looking. If the parameter exists, it's must working. Have you tried issuing the command from a command prompt? Confidentiality Notice: This electronic message and any attachments may contain confidential or privileged information, and is intended only for the individual or entity identified above as the addressee. If you are not the addressee (or the employee or agent responsible to deliver it to the addressee), or if this message has been addressed to you in error, you are hereby notified that you may not copy, forward, disclose or use any part of this message or any attachments. Please notify the sender immediately by return e-mail or telephone and delete this message from your system. ___ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users