Get rid of setup_resource_management()

Just call setup_ub() directly.

Note there is no need to call check_ub() before setup_ub() because
check_ub() has already been called in vps_start_custom, no need to check
twice.

vps_run_script() is a separate beast though, let's add check_ub() to it.

This also makes the previous commit 09c6269 working, because check_ub()
was called from setup_resource_management() which was called from
vps_real_env_create() after vz_chroot(), therefore /proc/vz/vswap file
was not available.

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