]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Create the cgroup proxy before trying to set it up.
authordlezcano <dlezcano>
Tue, 7 Oct 2008 14:23:25 +0000 (14:23 +0000)
committerdlezcano <dlezcano>
Tue, 7 Oct 2008 14:23:25 +0000 (14:23 +0000)
src/lxc/start.c

index 76ba9cdbbde7b18e507ab8e368a45939fc40b98d..5e95009eaa1cea47123f1381a4510a005bb7ab7a 100644 (file)
@@ -187,6 +187,9 @@ int lxc_start(const char *name, int argc, char *argv[],
                goto err_pipe_read;
        }
 
+       if (lxc_link_nsgroup(name, pid))
+               lxc_log_warning("cgroupfs not found: cgroup disabled");
+
        /* Create the network configuration */
        if (clone_flags & CLONE_NEWNET && conf_create_network(name, pid)) {
                lxc_log_error("failed to create the configured network");
@@ -230,9 +233,6 @@ int lxc_start(const char *name, int argc, char *argv[],
 
        close(fd);
 
-       if (lxc_link_nsgroup(name, pid))
-               lxc_log_warning("cgroupfs not found: cgroup disabled");
-
        if (lxc_setstate(name, RUNNING)) {
                lxc_log_error("failed to set state to %s", 
                              lxc_state2str(RUNNING));