Re: RFC: 'old' event for leaseshelper.c when lease renews

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Bummer. When 'init' is sent to the leases helper program, the
> interface name is not known :'( so the helper program doesn't know
> which *.status file it has to read and print to stdout.
>
> Simon came up with the following hack:
> ""
> The most obvious nasty hack to make this work would be to have a set of
>  filesystem links to the real lease-change script, each with a different
> name, and configure each dnsmasq to call a unique link. The script then
> checks argv[0] to find the name it was called by and then transforms
> that into the name of the corresponding database file.
>
>
> So we have something like
>
> scripts/interface1 is a link to /lib/libvirt/lease-change-
> script
> scripts/interface2 is a link to /lib/libvirt/lease-change-script
>
> and start dnsmasq with
>
> dnsmasq --interface=interface1 --dhcp-script=scripts/interface1
>
> and the script finds the basename of argv[0[:
>
> scripts/interface1 -> interface1
>
> and prepends the directory where  the lease files are
>
> interface1 ->leasefiles/interface1
>
> That works in the absence on the DNSMASQ_INTERFACE variable.
> ""
>
> Is this hack acceptable?

Ping!

-- 
Nehal J Wani

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]