<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 7, 2017 at 8:34 AM, Norman Elton <span dir="ltr"><<a href="mailto:normelton@gmail.com" target="_blank">normelton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We keep our DHCP configuration in a git repository. In the case of<br>
failover pairs, they share a repository. This works great, since the<br>
vast majority of the configuration is identical.<br>
<br>
Of course, the failover configuration is different between the two<br>
servers. To solve this, my dhcpd.conf file does an include on<br>
"dhcp-failover.conf", which doesn't actually exist in the repository.<br>
Instead, it's a symlink to either "dhcp-failover-01.conf" or<br>
"dhcp-failover-02.conf". This works, but I have to manually create the<br>
symlink when we check out the repository.<br>
<br>
Not the end of the world, but it would be much smoother to say:<br>
<br>
include "dhcp-failover-${HOSTNAME}"<br>
<br>
So that the dhcpd.conf file automatically points to the correct<br>
failover config file.<br>
<br>
Is there any way to include a variable in an included path name? Or<br>
conditionally include a file?<br>
<br>
Thanks!<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
Norman Elton<br></font></span></blockquote><div><br></div>git has a ".gitignore" file where you can list files and directories to be ignored.  Try listing the symlink file in .gitignore.</div><div class="gmail_quote"><br><div>Otherwise, I would just put the symlink somewhere outside the directories controlled by git.</div><div><br></div><div>-- </div><div>Bob Harold</div><div> <br></div></div></div></div>