Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Improve subvolume deletion somewhat #435

Merged
merged 1 commit into from
Jun 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ restore_and_reboot() {
delete_subvolume(){
if [ -d "$1" ]; then
init
devpath=$(grep $1 /proc/mounts | awk '{print $1}')
mount $devpath $2 -o subvol="/@"
btrfs subvolume delete "$2/$1" || true
umount "$2" || true
if devpath=$(grep $1 /proc/mounts | awk '{print $1}') ; then
mount $devpath $2 -o subvol="/@"
btrfs subvolume delete "$2/$1" || true
umount "$2" || true
fi
fi
}

Expand Down