mirror of
git://github.com/lxc/lxc
synced 2025-09-01 19:29:29 +00:00
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:
@@ -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"))
|
||||||
|
Reference in New Issue
Block a user