Leveraging system hostname as part of a jail's hostname

Joseph Ward jbwlists at hilltopgroup.com
Thu Jun 21 15:18:53 UTC 2018


Thanks for the suggestion, but my case is a bit wacky.  I'm actually
creating the jails on a build box, packaging them, and deploying them to
a bunch of different host machines, so ideally the change would be
handled across all machines without any changes.  Fortunately, the
suggestion in the other sub-thread worked well.  (In a previous
iteration I'd had the deploy script make the change on each machine, but
that's a lot less clean than just having a single jail.conf that worked
for all).


-Joseph


On 06/20/2018 20:57, Erich Dollansky wrote:
> Hi,
>
> I use a script that generates the configuration file when the jail is
> created.
>
> This should work for you too.
>
> Erich
>
>
>  On Tue, 19 Jun 2018 22:41:15 -0400
> Joseph Ward <jbwlists at hilltopgroup.com> wrote:
>
>> Hi everyone,
>>
>> I have several jails, configured via jail.conf, whose hostname I want
>> to make: $name.$system_hostname.
>>
>> Is there a way to do this in jail.conf?   If I use:
>>
>> host = inherit;
>>
>> the hostnames of the jails all match the hostname of the system.  I
>> tried using:
>>
>> host.hostname = $name;
>> host.domainname = inherit;
>>
>> but the hostname ends up just being $name (expanded, of course).
>>
>> Trying:
>>
>> host = inherit;
>> host.hostname = $name;
>>
>> ended up with simply $name as well, with the "inherit" ignored.
>>
>> So, am I missing something? 
>>
>>
>> Thanks,
>>
>> Joseph
>>
>> _______________________________________________
>> freebsd-jail at freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-jail
>> To unsubscribe, send any mail to
>> "freebsd-jail-unsubscribe at freebsd.org"



More information about the freebsd-jail mailing list