Commit a9c7e2be by dlezcano

Remove 'init' file when destroying the container

parent b4915399
...@@ -74,6 +74,7 @@ static int remove_lxc_directory(const char *dirname) ...@@ -74,6 +74,7 @@ static int remove_lxc_directory(const char *dirname)
int lxc_destroy(const char *name) int lxc_destroy(const char *name)
{ {
int ret = -1, lock; int ret = -1, lock;
char path[MAXPATHLEN];
lock = lxc_get_lock(name); lock = lxc_get_lock(name);
if (!lock) { if (!lock) {
...@@ -92,6 +93,9 @@ int lxc_destroy(const char *name) ...@@ -92,6 +93,9 @@ int lxc_destroy(const char *name)
goto out_lock; goto out_lock;
} }
snprintf(path, MAXPATHLEN, LXCPATH "/%s/init", name);
unlink(path);
lxc_monitor_cleanup(name); lxc_monitor_cleanup(name);
if (lxc_unconfigure(name)) { if (lxc_unconfigure(name)) {
......
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