Commit 457a70da authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm: don't hide errors in cgroup02.hook

rmdir is executed for non-existent directories, so we don't check
an exit code of this operation.

This patch executs rmdir only for existent directories and check
an exit code of rmdir.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 02ecc822
...@@ -7,11 +7,9 @@ rmroots() { ...@@ -7,11 +7,9 @@ rmroots() {
mount -t cgroup none $tname -o "$1" mount -t cgroup none $tname -o "$1"
set +e for d in "$tname/oldroot" "$tname/newroot" "$tname/zdtmtstroot"; do
rmdir "$tname/oldroot" test -d "$d" && rmdir "$d"
rmdir "$tname/newroot" done
rmdir "$tname/zdtmtstroot"
set -e
echo "Left there is:" echo "Left there is:"
ls "$tname" ls "$tname"
......
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