Hello,

Here is a patch fixing the shutdown of opensuse containers. The fix is
described at 
https://wiki.archlinux.org/index.php/Linux_Containers#Container_cannot_be_shutdown_if_using_systemd

Note, I tried to submit the patch on SF.net, but couldn't find any way
to do that. I hope submitting on the dev mailing list is the way to go.

Regards,

--
Cedric Bosdonnat

>From dfa2459afd1f8a05b50f354e2383b4bb8a71e578 Mon Sep 17 00:00:00 2001
From: Cedric Bosdonnat <cbosdon...@suse.com>
Date: Tue, 10 Sep 2013 17:44:40 +0200
Subject: [PATCH] Fixed opensuse template to make lxc-shutdown work.

The fix is described by
https://wiki.archlinux.org/index.php/Linux_Containers#Container_cannot_be_shutdown_if_using_systemd
---
 templates/lxc-opensuse.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in
index 1fc7e21..c8004fd 100644
--- a/templates/lxc-opensuse.in
+++ b/templates/lxc-opensuse.in
@@ -88,6 +88,9 @@ EOF
     ln -s ../getty@.service $rootfs/etc/systemd/system/getty.target.wants/getty@tty3.service
     ln -s ../getty@.service $rootfs/etc/systemd/system/getty.target.wants/getty@tty4.service
 
+    # copy host poweroff target as sigpwr target to make shutdown work
+    # see https://wiki.archlinux.org/index.php/Linux_Containers#Container_cannot_be_shutdown_if_using_systemd
+    cp /usr/lib/systemd/system/poweroff.target $rootfs/usr/lib/systemd/system/sigpwr.target
 
     touch $rootfs/etc/sysconfig/kernel
 
-- 
1.8.4

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to