Commit 9f44c578 by Michel Normand Committed by Daniel Lezcano

remove the LXCPATH/<name>/nsgroup file

There is no more need of this file so remove it. Signed-off-by: 's avatarMichel Normand <normand@fr.ibm.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 14ad6bfd
...@@ -119,23 +119,7 @@ int lxc_rename_nsgroup(const char *name, struct lxc_handler *handler) ...@@ -119,23 +119,7 @@ int lxc_rename_nsgroup(const char *name, struct lxc_handler *handler)
return ret; return ret;
} }
int lxc_link_nsgroup(const char *name, const char *nsgroup) #warning keep lxc_unlink_nsgroup fct to be able to destroy old created container.
{
char lxc[MAXPATHLEN];
int ret;
snprintf(lxc, MAXPATHLEN, LXCPATH "/%s/nsgroup", name);
unlink(lxc);
ret = symlink(nsgroup, lxc);
if (ret)
SYSERROR("failed to create symlink %s->%s", nsgroup, lxc);
else
DEBUG("'%s' linked to '%s'", nsgroup, lxc);
return ret;
}
int lxc_unlink_nsgroup(const char *name) int lxc_unlink_nsgroup(const char *name)
{ {
char nsgroup[MAXPATHLEN]; char nsgroup[MAXPATHLEN];
......
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
#define MAXPRIOLEN 24 #define MAXPRIOLEN 24
struct lxc_handler; struct lxc_handler;
int lxc_get_cgroup_mount(const char *mtab, char *mnt);
int lxc_rename_nsgroup(const char *name, struct lxc_handler *handler); int lxc_rename_nsgroup(const char *name, struct lxc_handler *handler);
int lxc_link_nsgroup(const char *name, const char *nsgroup);
int lxc_unlink_nsgroup(const char *name); int lxc_unlink_nsgroup(const char *name);
int lxc_cgroup_path_get(char **path, const char *name); int lxc_cgroup_path_get(char **path, const char *name);
......
...@@ -424,8 +424,7 @@ int lxc_spawn(const char *name, struct lxc_handler *handler, char *const argv[]) ...@@ -424,8 +424,7 @@ int lxc_spawn(const char *name, struct lxc_handler *handler, char *const argv[])
goto out_abort; goto out_abort;
} }
if (lxc_rename_nsgroup(name, handler) || if (lxc_rename_nsgroup(name, handler))
lxc_link_nsgroup(name, handler->nsgroup))
goto out_abort; goto out_abort;
/* Create the network configuration */ /* Create the network configuration */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment