[lxc-devel] [PATCH] Make lxc-start-ephemeral use lxc.ephemeral
Christian Brauner
christianvanbrauner at gmail.com
Wed Sep 30 12:32:24 UTC 2015
While lxc-copy is under review let users benefit (reboot survival etc.) from the
new lxc.ephemeral option already in lxc-start-ephemeral. This way we can remove
the lxc.hook.post-stop script-
Signed-off-by: Christian Brauner <christianvanbrauner at gmail.com>
---
src/lxc/lxc-start-ephemeral.in | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in
index d2c3904..3b3405c 100644
--- a/src/lxc/lxc-start-ephemeral.in
+++ b/src/lxc/lxc-start-ephemeral.in
@@ -306,16 +306,8 @@ touch $LXC_DIR/configured
dest.set_config_item("lxc.hook.pre-mount",
os.path.join(dest_path, "pre-mount"))
-# Generate post-stop script
if not args.keep_data:
- with open(os.path.join(dest_path, "post-stop"), "w+") as fd:
- os.fchmod(fd.fileno(), 0o755)
- fd.write("""#!/bin/sh
-[ -d "%s" ] && rm -Rf "%s"
-""" % (dest_path, dest_path))
-
- dest.set_config_item("lxc.hook.post-stop",
- os.path.join(dest_path, "post-stop"))
+ dest.set_config_item("lxc.ephemeral", "1")
dest.save_config()
--
2.6.0
More information about the lxc-devel
mailing list