Closed mrichar1 closed 6 years ago
Nice! I think, we can add this very soon.
Hi - just coming back to this and just realised that theis PR was merged into FooDeas:dhcp_options
but doesn't seem to have then been merged into master
.
Is there any chance this could happen for the next release? Thanks!
This is a first stab at resolving #156 which aims to read extra options from
udhcpc
and use them to override config options.The idea is that there is a
dhcp_options
config list, and any item listed there will be read from udhcpc if an equivalent exists. The full list of udhcpc options is given here:https://udhcp.busybox.net/README.udhcpc
The most useful ones are
hostname
anddomain
- additionallytimeserver
is specially handled since theudhcpc
option is namedntpsrv
.The code seems to work as expected, but probably needs a review, since it's a while since I did anything advanced in bash - especially the sourcing of the variables from the
default.script
and use oftmpvar
and variable expansion which might not be 'best practice'. So please feel free to comment/suggest improvements/alternatives!