[Dnsmasq-discuss] Lease Time Detail

richardvoigt at gmail.com richardvoigt at gmail.com
Thu Sep 22 15:38:52 BST 2011


Surely the DNSMASQ_LEASE_EXPIRES variable should be captured also.

On Thu, Sep 22, 2011 at 8:08 AM, Helmut Hullen <Hullen at t-online.de> wrote:
> Hallo, Pratik,
>
> Du meintest am 22.09.11:
>
>> And can I pls ask u to show me a simple script to do so??? I m
>> totally naive for scripting so.. Thanks in advance.. :)
>
> Just an example:
>
> Part of "/etc/dnsmasq.conf":
>
>        dhcp-script=/root/bin/clientname
>
> Script "/root/bin/clientname":
>
> #! /bin/bash
> # meldet den Client-Name fuer dnsmasq
> # wird in der "dnsmasq"-Konfiguration von "dhcp-script" aufgerufen
>
> test "$DNSMASQ_SUPPLIED_HOSTNAME" || exit
>
> export LC_ALL=C
> Log=/var/log/clients.log
>
> echo -e "${2}\t${3}\t${DNSMASQ_SUPPLIED_HOSTNAME}\t"$(date +%F\ %X) >> $Log
> #
>
> # -------------------------------------------------------------
>
> That script has another purpose than you want, but you may see how to
> use the dnsmasq variables.
>
> You can see more details via
>
>        man dnsmasq
>
> under "-6 --dhcp-script"
>
> The meaning of "${1}" to "${4}" is explained under "arguments" in this
> paragraph.
> p.e.: "${2}" contains the MAC address.
>
> Viele Gruesse!
> Helmut
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>



More information about the Dnsmasq-discuss mailing list