]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Fixed opensuse template to make lxc-shutdown work.
authorCedric Bosdonnat <cbosdonnat@suse.com>
Tue, 10 Sep 2013 16:00:41 +0000 (18:00 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 10 Sep 2013 22:19:20 +0000 (18:19 -0400)
The fix is described by:
https://wiki.archlinux.org/index.php/Linux_Containers#Container_cannot_be_shutdown_if_using_systemd

Signed-off-by: Cedric Bosdonnat <cbosdonnat@suse.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-opensuse.in

index 1fc7e21a6ad5253cd5f385fbc9db9d15f3be7ba7..c8004fd30390f81fd634f2866e145d88bb45b11f 100644 (file)
@@ -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