improve mount subvolume

master
David Kebler 2023-12-15 11:17:06 -08:00
parent 2d61144804
commit 7963e13c59
1 changed files with 5 additions and 1 deletions

View File

@ -94,7 +94,11 @@ sudo /bin/find $1 -maxdepth $2 -type d -exec sh -c '
# ' find-sh {} + \) \) # ' find-sh {} + \) \)
mount_subvolume () { mount_subvolume () {
echo sudo mount $1 -o subvol=$2 $3
if mountpoint $3; then
echo $3 already a mountpoint, aborting subvolume mount
else
mkdir -p $3 mkdir -p $3
echo msudo mount $1 -o subvol=$2 $3
sudo mount $1 -o subvol=$2 $3 sudo mount $1 -o subvol=$2 $3
fi
} }