Commit d76db55b by Stéphane Graber

lxc-start-ephemeral: Wipe the whole container on exit, not just the rootfs

parent f282a2f4
...@@ -218,7 +218,7 @@ if not args.keep_data: ...@@ -218,7 +218,7 @@ if not args.keep_data:
os.fchmod(fd.fileno(), 0o755) os.fchmod(fd.fileno(), 0o755)
fd.write("""#!/bin/sh fd.write("""#!/bin/sh
[ -d "%s" ] && rm -Rf "%s" [ -d "%s" ] && rm -Rf "%s"
""" % (dest.get_config_item("lxc.rootfs"), dest.get_config_item("lxc.rootfs"))) """ % (dest_path, dest_path))
dest.set_config_item("lxc.hook.post-stop", dest.set_config_item("lxc.hook.post-stop",
os.path.join(dest_path, "post-stop")) os.path.join(dest_path, "post-stop"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment