File opensuse-systemd-shutdown.patch of Package lxc

diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in
index 77ef6b2..7c614c2 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
 
openSUSE Build Service is sponsored by