[lxc-devel] [lxc-templates/master] Sshd template fixes
mar-kolya on Github
lxc-bot at linuxcontainers.org
Fri May 11 19:08:29 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 351 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180511/7277eb35/attachment.bin>
-------------- next part --------------
From 4af8e52b8bb29c0f53ca0ae2806b32a4f882dde7 Mon Sep 17 00:00:00 2001
From: Nikolay Martynov <mar.kolya at gmail.com>
Date: Fri, 11 May 2018 14:56:36 -0400
Subject: [PATCH 1/2] Use lxc.autodev
---
templates/lxc-sshd.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/templates/lxc-sshd.in b/templates/lxc-sshd.in
index e6f90ad..40a08fb 100644
--- a/templates/lxc-sshd.in
+++ b/templates/lxc-sshd.in
@@ -136,7 +136,8 @@ lxc.cap.drop = sys_module mac_admin mac_override sys_time
# When using LXC with apparmor, uncomment the next line to run unconfined:
#lxc.apparmor.profile = unconfined
-lxc.mount.entry = /dev dev none ro,bind 0 0
+lxc.autodev = 1
+
lxc.mount.entry = /lib lib none ro,bind 0 0
lxc.mount.entry = /bin bin none ro,bind 0 0
lxc.mount.entry = /usr usr none ro,bind 0 0
From a7345d99ee6bc20ef4ac03811481762a24103e24 Mon Sep 17 00:00:00 2001
From: Nikolay Martynov <mar.kolya at gmail.com>
Date: Fri, 11 May 2018 14:57:32 -0400
Subject: [PATCH 2/2] Pass `$name` to init.lxc
---
templates/lxc-sshd.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/lxc-sshd.in b/templates/lxc-sshd.in
index 40a08fb..54309c7 100644
--- a/templates/lxc-sshd.in
+++ b/templates/lxc-sshd.in
@@ -239,7 +239,7 @@ EOF
ifconfig eth0 |grep inet
fi
- exec @SBINDIR@/init.lxc -- $sshd_path
+ exec @SBINDIR@/init.lxc --name $name -- $sshd_path
exit 1
fi
More information about the lxc-devel
mailing list