I am using Raspbian Stretch Lite 2018-04-18. I currently have static IP working over wifi. I setup /etc/wpa_supplicant/wpa_supplicant.conf
to connect to my wifi and setup /etc/dhcpcd.conf
to use a static ip:
interface wlan0
static ip_address=192.168.0.101/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
But, instead of making changes to the /etc/dhcpcd.conf
file I would like to be able to set the IP address of the Pi from a configuration file located in the /boot directory so that I can easily change it by mounting the sdcard on a Mac computer, which automounts the /boot partition. This will allow me to easily provision multiple pis with different IP addresses.
I know you can setup a static ip for ethernet using /boot/cmdline.txt, so I did try adding ip=192.168.0.101::192.168.0.1:255.255.255.0:rpi:wlan0:off
to this file, but that didn't work. This thread seems to imply setting ip in cmdline.txt only works for ethernet.