From: Igor Sukhih Date: Tue, 22 Aug 2006 13:40:41 +0000 (+0400) Subject: Remove VE name information on destroy X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff;h=57f3c25ff637984a467936aec2cab1d849bfde49 Remove VE name information on destroy http://bugzilla.openvz.org/show_bug.cgi?id=236 --- Index: vzctl-3.0.11/src/vzctl-actions.c =================================================================== --- vzctl-3.0.11.orig/src/vzctl-actions.c +++ vzctl-3.0.11/src/vzctl-actions.c @@ -222,7 +222,19 @@ static int create(vps_handler *h, envid_ static int destroy(vps_handler *h, envid_t veid, vps_param *g_p, vps_param *cmd_p) { - return vps_destroy(h, veid, &g_p->res.fs); + int ret, id; + char buf[STR_SIZE]; + char *name = g_p->res.name.name; + + ret = vps_destroy(h, veid, &g_p->res.fs); + if (!ret && name != NULL) { + id = get_veid_by_name(name); + if (id == veid) { + snprintf(buf, sizeof(buf), VENAME_DIR "/%s.conf", name); + unlink(buf); + } + } + return ret; } static int parse_chkpnt_opt(int argc, char **argv, vps_param *vps_p)