Use static DHCP feature.
Ok I "rtfm", I "utfs", still I can't explain the following.
I didn't tune Olegs firmware much, cept adding a cronjob. crontab file
is /var/spool/cron/crontabs/admin. This I added to the /usr/local/.files and saved/commited/enabled flashfs. Works like charme.
Now I discovered that I don't like the maximum lease time of 86400secs or 24hours my PCs get, even those that have manually assigned IP adress via MAC address. So I checked the net and discovered that dnsmasq also accepts hours (e.g. 168h for a week) or minutes or the word "infinite". hey cool, sounds like what I want. So I edited dnsmasq.conf to set infinite lease time. Restarted dnsmasq, renewed my ip, it works. Great. Now how to save dnsmasq permanently? Of course the same way I did with crontab file, I thought. Added "/etc/dnsmasq.conf" to /usr/local/.files, flashfs save/commit, output says it's saved. Reboot ... WTF it's back to old setting. Strange enough ... if I manually do a "flashfs load", dnsmasq.conf is overwritten and the changes I made are there like they should be.
So why is the crontab file loaded correctly from flashfs at boot time, and dnsmasq.conf is not, though it is in there.
Use static DHCP feature.
Thats what I meant with "manually assigned IP adress via MAC address" ... I have entered the MAC adresses of each PC and assigned a IP. Still I only get a lease time of 24hours. And the problem I have with that is, that when the 24hours passed, the PCs renew the IP and lose internet connection for a few seconds. But hey , I know how to solve the 24hour problem, what I really wanted to know is why is dnsmasq.conf not loaded properly from flashfs while another file is loaded fine?
by the way .. I use your 6c-pre firmware Oleg ... could that be a bug only in this version?
Update: I found another trick to solve the problem ... I simply did
nvram set dhcp_lease=infinite
After this even the webinterface shows infinite
But still my question remains, why was the file not loaded? One idea I have is, that it is loaded, but afetrwards overwritten with settings from nvram. If so, can this be changed (so "flashfs load" is executed after the nvram settings are written to files)?
And another question Oleg: Can you include the possibility to enter values like "24h" or "infinite" as lease time in the webinterface? I think that would make a lot of sense
Last edited by TheEagle; 10-11-2005 at 16:14.
You could also do it like this:
First, store your modified dnsmasq.conf in /usr/local/etc
Then, and i suppose you already have a post-boot script, add the following lines to post-boot:
Of course don't forget the flashfs save and flashfs commit ...Code:cp /usr/local/etc/dnsmasq.conf /tmp/etc/dnsmasq.conf killall -9 dnsmasq dnsmasq
This works for me !
Greetz
In fact /usr/local/etc/dnsmasq.conf is appended to the /etc/dnsmasq.conf, when the former is get automatically generated on boot and overwrites existing file (this is not a bug, this is by design).
Thats what I wanted to know, thx oleg. Still it would be a really good idea, to have the ability to enter more values in the lease time field. Maybe I'll try to do that myself when I have the time. If I have success, I'll let you know.Originally Posted by Oleg
oh and cu112, thx for the info, too. But in the end I like my nvram solution a lil better, since it's only one command that I have to do once after flashing the firmware.