-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Based on a discussion today, hostnames need to be unique on Berkeley's networks, which would require us to edit /etc/hostname on each gateway to include its MAC address.
It would be better if we could have the gateway automatically configure /etc/hostnames/ and /etc/sensu/conf.d/client.json on boot based on the MAC address. This would mean that the only personalization needed for each gateway would be /etc/network/interfaces to set the MAC address.
I think this can be done with a script that runs on boot after the filesystem has been initialized. The very first time, it would probably not affect the hostname early enough in the boot process to fix it, but the second boot (and thereafter) everything should work fine.
http://askubuntu.com/questions/500916/setting-hostname-on-startup