Closed locutusofsand closed 4 years ago
Piserver is typically used in proxy dhcp mode, working together with an existing DHCP server in the network. In that scenario the duty to provide a hostname is on the main DHCP server that hands out the IP-address, so outside of Piserver's control. While Piserver also has an alternative option to work in standalone DHCP server mode, in which it is theoretically possible to let it hand out hostnames, I am not sure if its usage is common enough to justify adding an option to assign hostnames to the GUI.
Why are you unable to use IP/MAC/serial instead?
I do currently have this setup on a server with dual NIC's and I am running it standalone DHCP on one of those NIC's.
I understanding this use case being too irregular to add anything to the GUI.
I followed your suggestion of using the MAC address. I changed the name of the workcenter pages to match their corresponding MAC address and used
mac=$(cat /sys/class/net/eth0/address)
inside my script to grab the MAC address.
This is working so I am going to close the issue. The only downside is my boot time went from 2:10 to 6:10 with this change so I am going to have to track down the reason chrome takes so long to open the page.
Thanks for the help.
I accidentally posted this over at the rpi-eeprom repo and they kindly directed me back here.
I am planning on deploying about 30 Pi's in an industrial environment at individual work centers. I am going to use them much like a kiosk to do various web based functions. The pages I need to serve up are unique to each work center. Ideally I would like to boot directly to the needed page. The only way that I have thought to do that is if I could give each of the Pi's its own host name and use that host name to populate the link in the script I use to boot from. Is there any way that I could tie the description field under the Clients tab in PiServer to the hostname of each device?