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

Commit

Permalink
Merge pull request #435 from jesusaurus/remove_deployment
Browse files Browse the repository at this point in the history
Improve subvolume deletion somewhat
  • Loading branch information
jgu17 authored Jun 4, 2019
2 parents 480955b + f699164 commit 0671482
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 0671482

Please sign in to comment.