clean_hardlink_dir(): note unlink/rmdir errors

Just make sure if there are any errors they are not left unnoticed.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
compare_osrelease(): fix for 3.x kernels

With kernel 3.0, the patch number might as well be absent,
so instead of failing let's assume it is zero.

Not tested.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
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>
vzctl set: add NUMA --nodemask

This patch adds an ability to specify NUMA node mask for a container,
i.e. set on which NUMA nodes the given container will be executed.
In addition, it extends --cpumask to have a special value of auto,
which means "all CPUs within given NUMA node(s)".

vzctl --help, vzctl(8) man page and bash-completion modified
accordingly.

Note that
 * this only works for openvz kernels (openvz fairsched syscalls)
 * option --nodemask requires --cpumask (in the same command line)
 * --cpumask auto doesn't make sense without --nodemask

Signed-off-by: Kir Kolyshkin <kir@openvz.org>