1 Index: new/src/lib/destroy.c
2 ===================================================================
3 --- new.orig/src/lib/destroy.c 2012-02-10 06:33:24.000000000 +0100
4 +++ new/src/lib/destroy.c 2012-02-10 06:42:00.000000000 +0100
6 logger(0, 0, "Destroying container private area: %s", fs->private);
7 if ((ret = vps_destroy_dir(veid, fs->private)))
9 - move_config(veid, BACKUP);
10 + move_config(veid, DESTR_ALL);
11 if (destroy_dumpfile(veid, cpt != NULL ? cpt->dumpdir : NULL) < 0)
12 logger(-1, errno, "Warning: failed to remove dump file");
13 if (rmdir(fs->root) < 0)
14 Index: new/include/util.h
15 ===================================================================
16 --- new.orig/include/util.h 2012-02-10 06:33:24.000000000 +0100
17 +++ new/include/util.h 2012-02-10 06:40:25.000000000 +0100
24 #define PROCMEM "/proc/meminfo"
25 #define PROCTHR "/proc/sys/kernel/threads-max"
26 Index: new/src/lib/util.c
27 ===================================================================
28 --- new.orig/src/lib/util.c 2012-02-10 06:33:24.000000000 +0100
29 +++ new/src/lib/util.c 2012-02-10 06:40:25.000000000 +0100
32 snprintf(conf, sizeof(conf), VPS_CONF_DIR "%d.%s", veid, prefix);
33 snprintf(newconf, sizeof(newconf), "%s." DESTR_PREFIX, conf);
34 - action == BACKUP ? rename(conf, newconf) : unlink(newconf);
35 + if (action == BACKUP) {
36 + rename(conf, newconf);
37 + } else if (action == DESTR_ALL) {
40 + } else if (action == DESTR) {
45 /* Renames or removes CT config and various CT scripts.