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

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Stéphane Graber 2012-10-31 08:20:52 +01:00
parent f282a2f4b8
commit d76db55b6c

View File

@ -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"))