[lxc-devel] [lxc-ci/master] Configure the hostname properly.

vStone on Github lxc-bot at linuxcontainers.org
Sat Sep 21 18:58:54 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 400 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190921/92b3470d/attachment.bin>
-------------- next part --------------
From ecb2826a8e7d5dacf7f498637bb8c5e2b630cd9c Mon Sep 17 00:00:00 2001
From: Jan Vansteenkiste <jan at vstone.eu>
Date: Sat, 21 Sep 2019 19:23:14 +0200
Subject: [PATCH] Configure the hostname properly.

Having invalid configuration syntax in /etc/conf.d breaks
the initial network setup.
---
 images/gentoo.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/images/gentoo.yaml b/images/gentoo.yaml
index 3124b96..fcf4179 100644
--- a/images/gentoo.yaml
+++ b/images/gentoo.yaml
@@ -329,7 +329,8 @@ files:
 
  - name: conf-hostname
    path: /etc/conf.d/hostname
-   generator: hostname
+   generator: template
+   content: 'hostname="{{ container.name }}"'
 
  - name: hosts
    path: /etc/hosts


More information about the lxc-devel mailing list