mirror of
git://github.com/lxc/lxc
synced 2025-09-01 16:15:10 +00:00
Remove 'init' file when destroying the container
This commit is contained in:
@@ -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)
|
|||||||
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)) {
|
||||||
|
Reference in New Issue
Block a user