[pve-devel] [PATCH 01/01] pve-container debian hooks

hackru hackru at gmail.com
Tue Oct 13 17:01:09 CEST 2015


Here's patch stopping overwriting already generated inittab.
Short history:
We're using debian package runit which adds a couple of lines to system inittab. But currently PVE overwrites this files every container start and it's completely unusable.
In theory this patch could break something, but i'm unsure what(restore from openvz backups?!). 
Anyway, this issue prevents us from using pve containers so it should be fixed this way or another.
Thank you!


diff --git a/src/PVE/LXC/Setup/Debian.pm b/src/PVE/LXC/Setup/Debian.pm
index 1b2a277..6160178 100644
--- a/src/PVE/LXC/Setup/Debian.pm
+++ b/src/PVE/LXC/Setup/Debian.pm
@@ -81,7 +81,7 @@ sub setup_init {

     my $filename = "/etc/inittab";

-    if ($self->ct_file_exists($filename)) {
+    unless ($self->ct_file_exists($filename)) {
        my $inittab = $default_inittab;

        my $ttycount =  PVE::LXC::get_tty_count($conf);


More information about the pve-devel mailing list