From 5e7e741c1b5d4af26943c1e95c5caeb8605a74c3 Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Fri, 11 May 2018 14:56:36 -0400 Subject: [PATCH 1/2] Use lxc.autodev Signed-off-by: Nikolay Martynov --- 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 dcd92c8556b930b01b5df9e3a412876f4b44d503 Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Fri, 11 May 2018 14:57:32 -0400 Subject: [PATCH 2/2] Pass `$name` to init.lxc Signed-off-by: Nikolay Martynov --- 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