I'm trying to find a genric solution across all linux distro to find if the IP address attached to the system is a static or a DHCP ?
On ubuntu , I can find if it's static or DHCP by doing a DHCP grep on /var/log/syslog
but it is not generic solution , it might differ on other platforms.
One of the target board is Cortina and I'm using open wrt as a boot up kernel for that. There is no var/log/syslog
on Cortina nothing similar to that also.
ifconfig <your_interface>
and look at the flags listed, you may be able to find "DHCP" - this may be a little more generic across distros