[pve-devel] [PATCH v2 container 3/4] opensuse 13.2 support
Wolfgang Bumiller
w.bumiller at proxmox.com
Mon Feb 8 08:48:27 CET 2016
Needs the apparmor /run -> /var/run bind mount patch in
lxc-pve.
---
Changes:
fixed old comments about 13.2 and AppArmor
src/PVE/LXC/Setup/SUSE.pm | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/PVE/LXC/Setup/SUSE.pm b/src/PVE/LXC/Setup/SUSE.pm
index db8d140..165f2da 100644
--- a/src/PVE/LXC/Setup/SUSE.pm
+++ b/src/PVE/LXC/Setup/SUSE.pm
@@ -20,9 +20,8 @@ sub new {
# Fixme: not sure whether the minor part is optional.
if ($release =~ m/^\s*VERSION\s*=\s*(\d+)(?:\.(\d+))?\s*$/m) {
$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) {
+ # 13.2 needs an updated AppArmor profile (in lxc *after* 2.0.0.beta2)
+ if ($1 != 13 || ($2//0) > 2) {
die "unsupported suse release '$version'\n";
}
} else {
@@ -44,9 +43,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