Re: I: R: Persistent static IP, via CLI
Roy MarplesSat Dec 19 16:47:15 2020
On 19/12/2020 16:06, Igor Pellegrini wrote:
It means don't remove the configuration when dhcpcd exists.
That is all.
Ooh, so the config is retained after reboot, but is not being written in the conf file.
I have issues in modifying/appending on the conf file with few additional options, rather than replacing it; because of not knowing if there's some incompatible previous instruction that would need to be removed. I just hoped dhcpcd offered an easy way to edit the file programmatically.
No it literally means when dhcpcd exit
# Start dhcpcd
# See an ip address
# Tell dhcpd to exit
dhcpcd -x eth0
# If persisent is not given you will not see the ip address you had earlier
In call cases, the lease file where all this was obtained from is preserved.
With dhcpcd-9 you can do this
dhcpcd -U4 </path/to/dhcpcd/eth0.lease
And it will dump the variables dhcpcd sets from the lease.
Armed of stubbornness and practically no knowledge of c++, I'm taking a look at dhcpcd-ui's `config.h`
to understand if I can eventually reuse it 😅
Cross fingers 🤞🏼
libdhcpcd can be used by C (dhcpcd-gtk) and C++ (dhcpcd-qt) quite happily.
There is a Raspbian project which uses libdhcpcd as well for their own front end
Archive administrator: firstname.lastname@example.org