Note: I have "net.ifnames=0" in /boot/cmdline.txt so that I get the old interface names (eth0 etc) back.
I've always worked with /etc/network/interfaces in the past, but Googling suggests the correct way to set a static IP is now to edit /etc/dhcpcd.conf and append: interface eth0 static ip_address=192.168.0.28/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.5
If I restart dhcpcd or networking: sudo service networking restart
.. then the new IP address gets added, but the old IP address gets retained until reboot. (Regardless of whether the old IP came from DHCP or was a previous static.)
What am I doing wrong?
Note: If there's a better way to set a static IP then I'm happy to look at that instead.