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

vStone on Github lxc-bot at linuxcontainers.org
Sun Sep 22 09:51:37 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 439 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190922/d9295f3a/attachment.bin>
-------------- next part --------------
From f3ea324ad323b054ef52c25ec72512b5a3cafdf3 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 for gentoo hosts.

Having invalid configuration syntax in /etc/conf.d breaks
the initial network setup.

Signed-off-by: Jan Vansteenkiste <jan at vstone.eu>
---
 images/gentoo.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/images/gentoo.yaml b/images/gentoo.yaml
index 3124b96..9de6ea3 100644
--- a/images/gentoo.yaml
+++ b/images/gentoo.yaml
@@ -329,7 +329,9 @@ 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