2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 04:09:36 +00:00

Remove 'init' file when destroying the container

This commit is contained in:
dlezcano
2008-09-08 14:24:05 +00:00
parent b491539932
commit a9c7e2be64

View File

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