[pve-devel] [PATCH container 3/3] opensuse 13.2 support

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Feb 5 08:49:06 CET 2016


Needs the apparmor /run -> /var/run bind mount patch in
lxc-pve.
---
 src/PVE/LXC/Setup/SUSE.pm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Setup/SUSE.pm b/src/PVE/LXC/Setup/SUSE.pm
index db8d140..13f2760 100644
--- a/src/PVE/LXC/Setup/SUSE.pm
+++ b/src/PVE/LXC/Setup/SUSE.pm
@@ -22,7 +22,7 @@ sub new {
 	$version = "$1.$2";
 	# 13.2 seems to get stuck in a mount loop with AppArmor,
 	# and otherwise fails to start up fully. Needs some more work.
-	if ($1 != 13 || ($2//0) > 1) {
+	if ($1 != 13 || ($2//0) > 2) {
 	    die "unsupported suse release '$version'\n";
 	}
     } else {
@@ -44,9 +44,21 @@ sub setup_init {
     my ($self, $conf) = @_;
 
     $self->setup_securetty($conf, qw(lxc/console lxc/tty1 lxc/tty2 lxc/tty3 lxc/tty4));
+    if ($self->{version} >= 13.2) {
+	$self->setup_container_getty_service();
+    }
     $self->setup_systemd_console($conf);
 }
 
+sub setup_container_getty_service {
+    my ($self) = @_;
+    my $servicefile = '/usr/lib/systemd/system/container-getty at .service';
+    my $raw = $self->ct_file_get_contents($servicefile);
+    if ($raw =~ s at pts/%I at lxc/tty%I at g) {
+	$self->ct_file_set_contents($servicefile, $raw);
+    }
+}
+
 sub setup_network {
     my ($self, $conf) = @_;
 
-- 
2.1.4





More information about the pve-devel mailing list