Date: Sat, 17 Sep 2022 12:22:20 -0700 From: John Kennedy <warlock@phouka.net> To: Guido Falsi <mad@madpilot.net> Cc: freebsd-hackers@freebsd.org, virtualization@freebsd.org Subject: Re: Dynamic hostname in rc.conf (for bhyve VMs) Message-ID: <YyYebGZrHJ73m9kZ@phouka1.phouka.net> In-Reply-To: <f76151eb-8374-5691-b158-d3c7be9f6169@madpilot.net> References: <f76151eb-8374-5691-b158-d3c7be9f6169@madpilot.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 10, 2022 at 10:52:01AM +0200, Guido Falsi wrote: > Since rc.conf is just a shell script I'd like to be able to set hostname > dynamically. AFAIK, not a shell-script (although variables are set in that syntax). I wasn't trying to do exactly what you are, but one thing I did was set the MAC address as one of the bhyve options: ... -s 5,virtio-net,tap2,mac=00:01:02:03:04:05 ... (Changed the MAC address in the example, but pick a safe one for your setup) Should be able to provide your own rc.d configuration file that does something like do a switch on MAC and call the hostname script directly.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YyYebGZrHJ73m9kZ>