Verified Commit 58c5d911 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

clean-chroots: Recurse, like devtools' subvolume_delete_recursive does

Needed to get rid of subvolumes created by tmpfiles.
parent f0e7aa33
......@@ -13,6 +13,14 @@ echo "<6>Deleting ${#chroots} chroots"
if btrfs filesystem df . &>/dev/null; then
remove() {
local subvol
test -d $1
find $1 -mindepth 1 -xdev -depth -inum 256 -print0 |
while IFS= read -d $'\0' -r subvol; do
remove $subvol
btrfs sub del -- $1 &>/dev/null
......@@ -41,3 +49,5 @@ done
df -HT .
exit $ret
# vim:set sw=2 et:
Supports Markdown
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