Fix NFS when DHCP settings use a custom IP range

Only use the static IP if it is indeed a static IP. Otherwise assume
it's DHCP and get the IP that way.
Merge pull request #4434 from simoleone/fix-nfs-with-dhcp-custom-range

Fix NFS when DHCP settings use a custom IP range