setup_console: don't execute on older kernels
As it was pointed out on users@ mailing list, vzctl console
functionality is only available on RHEL6 kernel, so there is
no need to set up getty on an older (RHEL5) kernel. Neither
there's a need to do that on vanilla (non-openvz) kernel.
More to say, such getty configuration is bad if console is
not working, as it will lead to ever-restarting getty processes,
increased CPU usage and spam in logs.
To fix, add two more pre-conditions to execute setup_console:
(1) current kernel is VZ kernel
AND
(2) current kernel is 2.6.32 or newer
Reported-by: Aleksandar Ivanisevic <aleksandar@ivanisevic.de>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
3 files changed