]> git.proxmox.com Git - pve-container.git/commitdiff
Debian: correctly setup getty service on systemd based containers
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 21 Apr 2016 05:07:15 +0000 (07:07 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 21 Apr 2016 05:28:20 +0000 (07:28 +0200)
File /etc/inittab does not exist on systemd based containers.

debian/changelog
src/PVE/LXC/Setup/Debian.pm

index 9eafd9da72e924bba523ec800c41c05310a18301..8486c5f0966758efeffc0fe33d35cae210761871 100644 (file)
@@ -6,6 +6,8 @@ pve-container (1.0-61) unstable; urgency=medium
 
   * fix #942: restore ACL and other rootfs options from backup
 
+  * Debian: correctly setup getty service on systemd based containers
+
  -- Proxmox Support Team <support@proxmox.com>  Wed, 20 Apr 2016 11:25:34 +0200
 
 pve-container (1.0-60) unstable; urgency=medium
index db5d31709d1ecd439847a4b8f9738ea4375fc1ea..4dae6683111f470b0862d5437fc053d98ed0338b 100644 (file)
@@ -40,6 +40,11 @@ sub new {
 sub setup_init {
     my ($self, $conf) = @_;
 
+    my $systemd = $self->ct_readlink('/sbin/init');
+    if (defined($systemd) && $systemd =~ m@/systemd$@) {
+       $self->setup_container_getty_service(1);
+    }
+
     my $filename = "/etc/inittab";
     return if !$self->ct_file_exists($filename);
 
@@ -69,11 +74,6 @@ sub setup_init {
     }
 
     $self->ct_file_set_contents($filename, $inittab);
-
-    my $systemd = $self->ct_readlink('/sbin/init');
-    if (defined($systemd) && $systemd =~ m@/systemd$@) {
-       $self->setup_container_getty_service(1);
-    }
 }
 
 sub remove_gateway_scripts {