mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 10:51:24 +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:
parent
f282a2f4b8
commit
d76db55b6c
@ -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"))
|
||||||
|
Loading…
Reference in New Issue
Block a user