mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-19 01:26:22 +00:00
Co-developed-by: Stepan Pieshkin <stepanpieshkin@google.com> Signed-off-by: Stepan Pieshkin <stepanpieshkin@google.com> Signed-off-by: Michal Clapinski <mclapinski@google.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
19 lines
389 B
Bash
Executable file
19 lines
389 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
[ "$1" == "--clean" -o "$1" == "--pre-restore" ] || exit 0
|
|
|
|
tname=$(mktemp -d cgclean.XXXXXX)
|
|
trap 'rmdir "${tname}"' EXIT
|
|
|
|
mount -t cgroup none $tname -o "none,name=zdtmtst"
|
|
trap 'umount "${tname}"; rmdir "${tname}"' EXIT
|
|
|
|
echo "Cleaning $tname"
|
|
|
|
rmdir "$tname/subcg_threads/subsubcg/" || true
|
|
rmdir "$tname/subcg_threads/" || true
|
|
|
|
echo "Left there is:"
|
|
ls "$tname"
|