[pve-devel] [PATCH v3 container] setup: allow fedora 22-25

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Dec 9 09:54:24 CET 2016


This should allow vanilla lxc templates to work without the
double-console issue by removing their getty at .service
replacement. (Since we instead fixup
container-getty at .service)
---
Changes to the second patch of the previous series:
* unlink lxc's getty at .service replacement
* always call setup_container_getty_service
* include fedora 25, fingers crossed ;-)

 src/PVE/LXC/Setup/Fedora.pm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Setup/Fedora.pm b/src/PVE/LXC/Setup/Fedora.pm
index ff60b10..70aab62 100644
--- a/src/PVE/LXC/Setup/Fedora.pm
+++ b/src/PVE/LXC/Setup/Fedora.pm
@@ -16,7 +16,7 @@ sub new {
     my $version;
 
     if ($release =~ m/release\s+(\d+(?:\.\d+)?)(\.\d+)?/) {
-	if ($1 >= 22 && $1 < 23) {
+	if ($1 >= 22 && $1 < 26) {
 	    $version = $1;
 	}
     }
@@ -30,4 +30,15 @@ sub new {
     return bless $self, $class;
 }
 
+sub template_fixup {
+    my ($self, $conf) = @_;
+    $self->setup_securetty($conf);
+    $self->ct_unlink('/etc/systemd/system/getty at .service');
+}
+
+sub setup_init {
+    my ($self, $conf) = @_;
+    $self->setup_container_getty_service($conf);
+}
+
 1;
-- 
2.1.4





More information about the pve-devel mailing list