<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">> I did read that as<br></div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>>   How are GUID/UUID provided to  dhcp-script?</div><div>Yes, this is what I meant.</div><div><br></div><div>> |  If the client provides user-classes, DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn </div><div>> and see if DNSMASQ_USER_CLASS97 is indeed GUID/UUID</div><div>I checked the all environment variables with `printenv` like below.</div><div><br></div><div>1) create dhcp-script and make it executable</div><div>$ sudo echo 'printenv >> /var/log/dhcp-script-test' > /usr/bin/dhcp-script'</div><div>$ sudo chmod +x /usr/bin/dhcp-script</div><div># dnsmasq user executes dnsmasq program</div><div>$ sudo chown dnsmasq:nogroup /usr/bin/dhcp-script</div><div><br></div><div>2) add "dhcp-script=/usr/bin/dhcp-script" to /etc/dnsmasq.conf</div><div>3) restart dnsmasq</div><div><br></div><div>and the result was:</div><div>```</div><div>DNSMASQ_TIME_REMAINING=3600</div><div>PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin</div><div>LANG=en_US.UTF-8</div><div>DNSMASQ_LEASE_EXPIRES=1550677504</div><div>_SYSTEMCTL_SKIP_REDIRECT=true</div><div>DNSMASQ_TAGS=vlan140</div><div>PWD=/</div><div>DNSMASQ_INTERFACE=vlan140</div><div>DNSMASQ_VENDOR_CLASS=Linux ipconfig</div><div>```</div><div><br></div><div>There is no DNSMASQ_USER_CLASS* variable.</div><div>Is this expected??</div><div>If I'm missing something, please tell me.</div><div><br></div><div>Thanks,</div><div>nishitani yuki</div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2019年2月20日(水) 19:30 Geert Stappers <<a href="mailto:stappers@hendrikx-itc.nl" target="_blank">stappers@hendrikx-itc.nl</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Feb 20, 2019 at 03:38:27PM +0900, 西谷優希 wrote:<br>
> Hi,<br>
> <br>
> <a href="http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2010q1/003844.html" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2010q1/003844.html</a><br>
> As mentioned in this post, a PXE request contains a GUID / UUID value.<br>
> Is there a way to refer this GUID / UUID in dhcp script?<br>
> <br>
> I'd like to implement like below:<br>
> 1. execute PXE Boot<br>
> 2. send DHCP request to dhsmasq<br>
> 3. hook dhcp-script which does:<br>
>   - refer UUID of the client<br>
>   - take the the client information from CMDB<br>
>   - create pxelinux.cfg/<UUID> with the taken information(e.g. RAID type,<br>
> kernel version)<br>
> 4. send DHCP response to the host<br>
> 5. booting goes on ...<br>
> <br>
> Of course, it is possible to use the MAC address of NIC in place of UUID,<br>
> but it can be changed by repair and replacement and the priority of UUID is<br>
> higher than the MAC address of NIC for pxelinux.<br>
> So it's great if GUID / UUID can be referred in dhcp script.<br>
<br>
I did read that as<br>
  How are GUID/UUID provided to  dhcp-script?<br>
<br>
Reading <a href="http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html" rel="noreferrer" target="_blank">http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html</a><br>
did not clearly reveal it.  My startpoint would<br>
<br>
|  If the client provides user-classes, DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn <br>
<br>
and see if DNSMASQ_USER_CLASS97 is indeed GUID/UUID<br>
<br>
<br>
Hope this helps,<br>
<br>
Regards<br>
Geert Stappers<br>
Devops Engineer Hendrikx ITC<br>
<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div>
</div></div>