Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-26 Thread Bob von Knobloch
On 26/01/17 16:33, Erich Titl wrote:
> For such an environment I would use (semi-)static addresses and put the
> names to /etc/hosts.
>
> cheers
>
> Erich
Yes, that would be my choice too.

Cheers,
Bob

-- 
The Sun is out, the sky is blue, it's time to drive the MR2.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-26 Thread Erich Titl

Hi Bob

Am 26.01.2017 um 16:09 schrieb Bob von Knobloch:

On 26/01/17 14:48, Erich Titl wrote:

Hi


...



cheers

Erich

Look at the dnsmasq option (from the manpage):

-K, --dhcp-authoritative
 Should be set when dnsmasq is definitely the only DHCP server on a
network. For DHCPv4, it changes the behaviour from strict RFC compliance
so that DHCP requests on unknown leases from unknown hosts are not
ignored. This allows new hosts to get a lease without a tedious timeout
under all circumstances. It also allows dnsmasq to rebuild its lease
database without each client needing to reacquire a lease, if the
database is lost. For DHCPv6 it sets the priority in replies to 255 (the
maximum) instead of 0 (the minimum).

Maybe this could help?


It could, still it appears that leases should not be shorter than one 
hour and if the leases file gets lost during a reboot then the DNS 
resolution for the the host might not work automatically although the 
system may still be reachable.


So the important point seems to be to preserve the DNS resolution for 
such a system and give dnsmasq a way to use it.


For such an environment I would use (semi-)static addresses and put the 
names to /etc/hosts.


cheers

Erich



smime.p7s
Description: S/MIME Cryptographic Signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-26 Thread Bob von Knobloch
On 26/01/17 14:48, Erich Titl wrote:
> Hi
>
> Am 26.01.2017 um 14:18 schrieb David M Brooke:
>>
> ...
>> To Eric’s point from before, using Static Leases (via dhcp-host= in
>> /etc/dnsmasq.conf)
>> ensures a device is given the same IP address consistently, but
>> dnsmasq doesn’t seem
>> to add the host to DNS unless there’s an *active* DHCP lease in effect.
>
> Set a very short lease time for these important devices. If dnsmasq does
> not support this then think about another dhcp daemon and add the leases
> to /etc/hosts automagically. This here makes me feel like dnsmasq's dhcp
> capabilities show some shortcomings, but then.
>
> cheers
>
> Erich
Look at the dnsmasq option (from the manpage):

-K, --dhcp-authoritative
 Should be set when dnsmasq is definitely the only DHCP server on a 
network. For DHCPv4, it changes the behaviour from strict RFC compliance 
so that DHCP requests on unknown leases from unknown hosts are not 
ignored. This allows new hosts to get a lease without a tedious timeout 
under all circumstances. It also allows dnsmasq to rebuild its lease 
database without each client needing to reacquire a lease, if the 
database is lost. For DHCPv6 it sets the priority in replies to 255 (the 
maximum) instead of 0 (the minimum).

Maybe this could help?

Cheers,

Bob
-- 
The Sun is out, the sky is blue, it's time to drive the MR2.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-26 Thread Erich Titl

Hi

Am 26.01.2017 um 14:18 schrieb David M Brooke:



...

To Eric’s point from before, using Static Leases (via dhcp-host= in 
/etc/dnsmasq.conf)
ensures a device is given the same IP address consistently, but dnsmasq doesn’t 
seem
to add the host to DNS unless there’s an *active* DHCP lease in effect.


Set a very short lease time for these important devices. If dnsmasq does 
not support this then think about another dhcp daemon and add the leases 
to /etc/hosts automagically. This here makes me feel like dnsmasq's dhcp 
capabilities show some shortcomings, but then.


cheers

Erich



smime.p7s
Description: S/MIME Cryptographic Signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-26 Thread Andrew
Hi.

The best solution will be set shall renew time and big lease time - but 
it seems like dnsmasq doesn't support renew time specifying...

You may try to use some persistent-mounted partition that will store 
your leases (not a perfect solution, but it's suitable if this isn't a 
boot partition).

Or you can try to add persistent IP records to dnsmasq config.

On 26.01.2017 11:22, Mark Berndt wrote:
> On Tue, 24 Jan 2017 03:35:17 PM John Sager wrote:
>> I think he wants to save it before every reboot rather than manually.
> yes, that is correct - I want to be able to save the ephemeral data that is
> not permanent configuration.
>
>> That would need a crafted script to save it (probably from local.stop), and
>> then reload it on boot up & make sure dnsmasq picked it up. You could put
>> the script in /root as everything there is saved to configdb.lrp. However if
>> the router just died on a power failure then you would end up with an old
>> leases file when it rebooted. Would that be a problem?
> I don't really see a problem with an old file, because the dhcp is fairly
> stable here.
>
>   The problem I get now is that I have no leases after a router reboot which
> seriously effects my semi-permanent devices such as IP cameras, phone etc.  I
> can't set them to a really short lease, because if the router is down I lose
> access to them.
>
> many thanks
>
> Marko
>
>
>> John
>>
>> On 24/01/17 14:48, Erich Titl wrote:
>>> Hi
>>>
>>> Am 23.01.2017 um 22:46 schrieb Mark Berndt:
 On Thu, 19 Jan 2017 04:52:57 PM Erich Titl wrote:
> Am 19.01.2017 um 02:24 schrieb Mark Berndt:
>> When I reboot my leaf system, /var/lib/misc/dnsmasq.leases is lost.
>>
>> I added it to my local config so it is saved, but of course this only
>> happens when save the config.
>>
>> What is the best way to preserve this information between reboots?
> The easiest way is to add it to /vart/lib/lrpkg/local.local
>
> cheers
>
> ET
 Thanks John & ET.
 How do I save the config from the command line, I want to put it in the
 stop script.  Is it possible to just save the local data, not the whole
 config?>
>>> What is local data if not the config.
>>>
>>> To save from the command line have a look at the apkg parameters.
>>>
>>> cheers
>>>
>>> ET
>>>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> 
> leaf-user mailing list: leaf-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/leaf-user
> Support Request -- http://leaf-project.org/



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-26 Thread David M Brooke

> On 26 Jan 2017, at 09:22, Mark Berndt  wrote:
> 
> On Tue, 24 Jan 2017 03:35:17 PM John Sager wrote:
>> I think he wants to save it before every reboot rather than manually.
> 
> yes, that is correct - I want to be able to save the ephemeral data that is 
> not permanent configuration.  
> 
>> 
>> That would need a crafted script to save it (probably from local.stop), and
>> then reload it on boot up & make sure dnsmasq picked it up. You could put
>> the script in /root as everything there is saved to configdb.lrp. However if
>> the router just died on a power failure then you would end up with an old
>> leases file when it rebooted. Would that be a problem?
> 
> I don't really see a problem with an old file, because the dhcp is fairly 
> stable here. 

An old file will probably contain expired leases, so it probably won’t work the 
way you want.
However, an old file is no worse than no file at all, so not a particular 
concern.

> 
> The problem I get now is that I have no leases after a router reboot which 
> seriously effects my semi-permanent devices such as IP cameras, phone etc.  I 
> can't set them to a really short lease, because if the router is down I lose 
> access to them.

To Eric’s point from before, using Static Leases (via dhcp-host= in 
/etc/dnsmasq.conf)
ensures a device is given the same IP address consistently, but dnsmasq doesn’t 
seem
to add the host to DNS unless there’s an *active* DHCP lease in effect.
So you need to *also* add an entry in /etc/hosts, for the address you know will 
get allocated.

Or we add some facility to save a defined list of “emphemeral data” files on a 
reboot...

> 
> many thanks
> 
> Marko
> 
> 
>> 
>> John
>> 
>> On 24/01/17 14:48, Erich Titl wrote:
>>> Hi
>>> 
>>> Am 23.01.2017 um 22:46 schrieb Mark Berndt:
 On Thu, 19 Jan 2017 04:52:57 PM Erich Titl wrote:
> Am 19.01.2017 um 02:24 schrieb Mark Berndt:
>> When I reboot my leaf system, /var/lib/misc/dnsmasq.leases is lost.
>> 
>> I added it to my local config so it is saved, but of course this only
>> happens when save the config.
>> 
>> What is the best way to preserve this information between reboots?
> 
> The easiest way is to add it to /vart/lib/lrpkg/local.local
> 
> cheers
> 
> ET
 
 Thanks John & ET.
 How do I save the config from the command line, I want to put it in the
 stop script.  Is it possible to just save the local data, not the whole
 config?> 
>>> What is local data if not the config.
>>> 
>>> To save from the command line have a look at the apkg parameters.
>>> 
>>> cheers
>>> 
>>> ET
>>> 
> 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-26 Thread Mark Berndt
On Tue, 24 Jan 2017 03:35:17 PM John Sager wrote:
> I think he wants to save it before every reboot rather than manually.

yes, that is correct - I want to be able to save the ephemeral data that is 
not permanent configuration.  

> 
> That would need a crafted script to save it (probably from local.stop), and
> then reload it on boot up & make sure dnsmasq picked it up. You could put
> the script in /root as everything there is saved to configdb.lrp. However if
> the router just died on a power failure then you would end up with an old
> leases file when it rebooted. Would that be a problem?

I don't really see a problem with an old file, because the dhcp is fairly 
stable here. 

 The problem I get now is that I have no leases after a router reboot which 
seriously effects my semi-permanent devices such as IP cameras, phone etc.  I 
can't set them to a really short lease, because if the router is down I lose 
access to them.

many thanks

Marko


> 
> John
> 
> On 24/01/17 14:48, Erich Titl wrote:
> > Hi
> > 
> > Am 23.01.2017 um 22:46 schrieb Mark Berndt:
> >> On Thu, 19 Jan 2017 04:52:57 PM Erich Titl wrote:
> >>> Am 19.01.2017 um 02:24 schrieb Mark Berndt:
>  When I reboot my leaf system, /var/lib/misc/dnsmasq.leases is lost.
>  
>  I added it to my local config so it is saved, but of course this only
>  happens when save the config.
>  
>  What is the best way to preserve this information between reboots?
> >>> 
> >>> The easiest way is to add it to /vart/lib/lrpkg/local.local
> >>> 
> >>> cheers
> >>> 
> >>> ET
> >> 
> >> Thanks John & ET.
> >> How do I save the config from the command line, I want to put it in the
> >> stop script.  Is it possible to just save the local data, not the whole
> >> config?> 
> > What is local data if not the config.
> > 
> > To save from the command line have a look at the apkg parameters.
> > 
> > cheers
> > 
> > ET
> > 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-24 Thread John Sager
ntp.drift doesn't need to be saved often. A reasonably aged computer crystal
will probably have quite a frequency error in the tens of parts per million
range. That may change by a few ppm over daily temperature cycling but it
won't have much of a change of the average over a period of months. So for a
new installation of ntpd, let it settle for a couple of days, then save
ntp.drift in the config, and then it will just get saved as config changes
are made from time to time.

John

On 24/01/17 21:23, David M Brooke wrote:
> I’ve also thought about preserving the contents of dnsmasq,leases. Sometimes 
> I scp that file to another machine before a BuC reboot then scp it back again 
> (and “svi dnsmasq restart”) afterwards.
> 
> It’s not a huge issue to lose the DHCP leases themselves; mostly the pain 
> comes from DNS not knowing about DHCP-allocated addresses (which dnsmasq 
> takes care of automagically) after a router reboot, until the leases are 
> renewed.
> 
> Would adding a script to /etc/rc0.d/ work as a trigger to save the file - at 
> least for a planned reboot? If the power dies then there’s not much you can 
> do.
> I agree it would be overkill to re-save the file for every lease renewal.
> 
> John’s comment about ntp.drift is a good one and there is other ‘runtime 
> state’ that might benefit from being saved - e.g. vnstat traffic statistics.
> Arguably those settings are different from ‘static config’.
> 
> davidMbrooke
> 
>> On 24 Jan 2017, at 20:11, Erich Titl  wrote:
>>
>> Hi
>>
>> Am 24.01.2017 um 15:35 schrieb John Sager:
>>> I think he wants to save it before every reboot rather than manually.
>>
>> In the end that is the same, you need to know how to save the config.
>>
>> You could do that every time a new lease is granted but I think that 
>> this would be a pretty heavy operation. If you need this for statistical 
>> stuff then it would be easier to log the leases somewhere else. Actually 
>> I would not know what else you need the file for.
>>
>> cheers
>>
>> ET
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> 
> leaf-user mailing list: leaf-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/leaf-user
> Support Request -- http://leaf-project.org/
> 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-24 Thread Erich Titl

Hi

Am 24.01.2017 um 22:23 schrieb David M Brooke:

I’ve also thought about preserving the contents of dnsmasq,leases. Sometimes I 
scp that file to another machine before a BuC reboot then scp it back again 
(and “svi dnsmasq restart”) afterwards.

It’s not a huge issue to lose the DHCP leases themselves; mostly the pain comes 
from DNS not knowing about DHCP-allocated addresses (which dnsmasq takes care 
of automagically) after a router reboot, until the leases are renewed.

Would adding a script to /etc/rc0.d/ work as a trigger to save the file - at 
least for a planned reboot?


Why not put it to the stop command? The planned reboot should go through 
these unless the scripts are broken.


 If the power dies then there’s not much you can do.

I agree it would be overkill to re-save the file for every lease renewal.

John’s comment about ntp.drift is a good one and there is other ‘runtime state’ 
that might benefit from being saved - e.g. vnstat traffic statistics.
Arguably those settings are different from ‘static config’.


And should therefore not go into config. I believe it all depends n the 
media. If you have a modern board which supports mSATA then why not 
write it do your mSATA disk on a different partition. Then you might 
also save each and every lease.


For the DNS issue, well if you need to preserve addresses or DNS 
resolution, then make those leases static. That is what they are for. 
The rest is really dynamic.


cheers

ET



smime.p7s
Description: S/MIME Cryptographic Signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-24 Thread David M Brooke
I’ve also thought about preserving the contents of dnsmasq,leases. Sometimes I 
scp that file to another machine before a BuC reboot then scp it back again 
(and “svi dnsmasq restart”) afterwards.

It’s not a huge issue to lose the DHCP leases themselves; mostly the pain comes 
from DNS not knowing about DHCP-allocated addresses (which dnsmasq takes care 
of automagically) after a router reboot, until the leases are renewed.

Would adding a script to /etc/rc0.d/ work as a trigger to save the file - at 
least for a planned reboot? If the power dies then there’s not much you can do.
I agree it would be overkill to re-save the file for every lease renewal.

John’s comment about ntp.drift is a good one and there is other ‘runtime state’ 
that might benefit from being saved - e.g. vnstat traffic statistics.
Arguably those settings are different from ‘static config’.

davidMbrooke

> On 24 Jan 2017, at 20:11, Erich Titl  wrote:
> 
> Hi
> 
> Am 24.01.2017 um 15:35 schrieb John Sager:
>> I think he wants to save it before every reboot rather than manually.
> 
> In the end that is the same, you need to know how to save the config.
> 
> You could do that every time a new lease is granted but I think that 
> this would be a pretty heavy operation. If you need this for statistical 
> stuff then it would be easier to log the leases somewhere else. Actually 
> I would not know what else you need the file for.
> 
> cheers
> 
> ET

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-24 Thread Erich Titl
Hi

Am 24.01.2017 um 15:35 schrieb John Sager:
> I think he wants to save it before every reboot rather than manually.

In the end that is the same, you need to know how to save the config.

You could do that every time a new lease is granted but I think that 
this would be a pretty heavy operation. If you need this for statistical 
stuff then it would be easier to log the leases somewhere else. Actually 
I would not know what else you need the file for.

cheers

ET





--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-24 Thread John Sager
I think he wants to save it before every reboot rather than manually.

That would need a crafted script to save it (probably from local.stop), and
then reload it on boot up & make sure dnsmasq picked it up. You could put
the script in /root as everything there is saved to configdb.lrp. However if
the router just died on a power failure then you would end up with an old
leases file when it rebooted. Would that be a problem?

John

On 24/01/17 14:48, Erich Titl wrote:
> Hi
> 
> Am 23.01.2017 um 22:46 schrieb Mark Berndt:
>> On Thu, 19 Jan 2017 04:52:57 PM Erich Titl wrote:
>>> Am 19.01.2017 um 02:24 schrieb Mark Berndt:
 When I reboot my leaf system, /var/lib/misc/dnsmasq.leases is lost.

 I added it to my local config so it is saved, but of course this only
 happens when save the config.

 What is the best way to preserve this information between reboots?
>>>
>>> The easiest way is to add it to /vart/lib/lrpkg/local.local
>>>
>>> cheers
>>
>>> ET
>>
>> Thanks John & ET.
>> How do I save the config from the command line, I want to put it in the stop
>> script.  Is it possible to just save the local data, not the whole config?
> 
> What is local data if not the config.
> 
> To save from the command line have a look at the apkg parameters.
> 
> cheers
> 
> ET
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> 
> leaf-user mailing list: leaf-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/leaf-user
> Support Request -- http://leaf-project.org/
> 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-24 Thread Erich Titl
Hi

Am 23.01.2017 um 22:46 schrieb Mark Berndt:
> On Thu, 19 Jan 2017 04:52:57 PM Erich Titl wrote:
>> Am 19.01.2017 um 02:24 schrieb Mark Berndt:
>>> When I reboot my leaf system, /var/lib/misc/dnsmasq.leases is lost.
>>>
>>> I added it to my local config so it is saved, but of course this only
>>> happens when save the config.
>>>
>>> What is the best way to preserve this information between reboots?
>>
>> The easiest way is to add it to /vart/lib/lrpkg/local.local
>>
>> cheers
>
>> ET
>
> Thanks John & ET.
> How do I save the config from the command line, I want to put it in the stop
> script.  Is it possible to just save the local data, not the whole config?

What is local data if not the config.

To save from the command line have a look at the apkg parameters.

cheers

ET

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-23 Thread Mark Berndt
On Thu, 19 Jan 2017 04:52:57 PM Erich Titl wrote:
> Am 19.01.2017 um 02:24 schrieb Mark Berndt:
> > When I reboot my leaf system, /var/lib/misc/dnsmasq.leases is lost.
> > 
> > I added it to my local config so it is saved, but of course this only
> > happens when save the config.
> > 
> > What is the best way to preserve this information between reboots?
> 
> The easiest way is to add it to /vart/lib/lrpkg/local.local
> 
> cheers
> 
> ET

Thanks John & ET.  
How do I save the config from the command line, I want to put it in the stop 
script.  Is it possible to just save the local data, not the whole config?

thanks

Marko

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-19 Thread Erich Titl
Am 19.01.2017 um 02:24 schrieb Mark Berndt:
> When I reboot my leaf system, /var/lib/misc/dnsmasq.leases is lost.
>
> I added it to my local config so it is saved, but of course this only happens
> when save the config.
>
> What is the best way to preserve this information between reboots?

The easiest way is to add it to /vart/lib/lrpkg/local.local

cheers

ET

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/


Re: [leaf-user] saving dnsmasq.leases on reboot

2017-01-19 Thread John Sager
the line 'var/lib/misc/dnsmasq.leases' needs to be added to the file
var/lib/lrpkg/dnsmasq.local in the dnsmasq.lrp package. You can do that
locally - untar dnsmasq.lrp into a temporary directory, edit the file & then
re-tar the directory contents to dnsmasq.lrp. When the configuration is
saved the script reads all the *.local files in /var/lib/lrpkg to tell it
what to save.

I have the same problem with ntpd.lrp. The distro version fails to save
/var/lib/ntp/ntp.drift. That is important so that the ntpd time offset error
converges quickly on reboot.

John

On 19/01/17 02:24, Mark Berndt wrote:
> When I reboot my leaf system, /var/lib/misc/dnsmasq.leases is lost.  
> 
> I added it to my local config so it is saved, but of course this only happens 
> when save the config.  
> 
> What is the best way to preserve this information between reboots?
> 
> I know I've got /etc/default/local.stop scripts, but how would I update the 
> local config only?
> 
> cheers
> 
> Marko 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> 
> leaf-user mailing list: leaf-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/leaf-user
> Support Request -- http://leaf-project.org/
> 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/