Yes, your trick also works.
The place to patch would be this (line 23)
The init-system of RHEL5-based OS and RHEL6-based OS are not that different as going to RHEL7-based systems, so your 'trick' can work. Maybe you should also look at the entries in PVE 3.x to see what has been done for RHEL5 with respect to OpenVZ to get a glimpse what you should patch or why.
What do you mean by "a part for annoyng kernel messages in /var/log/messages"?
The place to patch would be this (line 23)
Code:
root@proxmox:~# cat -n /usr/share/perl5/PVE/LXC/Setup/CentOS.pm | head -30
1 package PVE::LXC::Setup::CentOS;
2
3 use strict;
4 use warnings;
5 use Data::Dumper;
6 use PVE::Tools;
7 use PVE::Network;
8 use PVE::LXC;
9
10 use PVE::LXC::Setup::Base;
11
12 use base qw(PVE::LXC::Setup::Base);
13
14 sub new {
15 my ($class, $conf, $rootdir) = @_;
16
17 my $release = PVE::Tools::file_read_firstline("$rootdir/etc/redhat-release");
18 die "unable to read version info\n" if !defined($release);
19
20 my $version;
21
22 if ($release =~ m/release\s+(\d+\.\d+)(\.\d+)?/) {
23 if ($1 >= 6 && $1 < 8) {
24 $version = $1;
25 }
26 }
27
28 die "unsupported centos release '$release'\n" if !$version;
29
30 my $self = { conf => $conf, rootdir => $rootdir, version => $version };
The init-system of RHEL5-based OS and RHEL6-based OS are not that different as going to RHEL7-based systems, so your 'trick' can work. Maybe you should also look at the entries in PVE 3.x to see what has been done for RHEL5 with respect to OpenVZ to get a glimpse what you should patch or why.
What do you mean by "a part for annoyng kernel messages in /var/log/messages"?