better method of finding PVC_path
This commit is contained in:
parent
9e06680363
commit
fdf19626fa
@ -80,8 +80,9 @@ do
|
|||||||
done
|
done
|
||||||
data_name=$(echo "$pvc" | awk '{print $3}')
|
data_name=$(echo "$pvc" | awk '{print $3}')
|
||||||
mount=$(echo "$pvc" | awk '{print $4}')
|
mount=$(echo "$pvc" | awk '{print $4}')
|
||||||
path=$(find /*/*/ix-applications/releases/"$app"/volumes/ -maxdepth 0 | cut -c 6-)
|
volume_name=$(echo "$pvc" | awk '{print $4}')
|
||||||
echo -e "\nMounting\n""$path""""$mount""\nTo\n/mnt/temporary/$data_name" && zfs set mountpoint=/temporary/"$data_name" "$path""$mount" && echo -e "Mounted\n\nUnmount with the following command\nzfs set mountpoint=legacy ""$path"""$mount"\nOr use the Unmount All option"
|
full_path=$(zfs list | grep $volume_name | awk '{print $1}')
|
||||||
|
echo -e "\nMounting\n"$full_path"\nTo\n/mnt/temporary/$data_name" && zfs set mountpoint=/temporary/"$data_name" "$full_path" && echo -e "Mounted\n\nUnmount with the following command\nzfs set mountpoint=legacy "$full_path" && rmdir /mnt/temporary/"$data_name"\nOr use the Unmount All option"
|
||||||
break
|
break
|
||||||
elif [[ $selection == "2" ]]; then
|
elif [[ $selection == "2" ]]; then
|
||||||
mapfile -t unmount_array < <(basename -a /mnt/temporary/* | sed "s/*//")
|
mapfile -t unmount_array < <(basename -a /mnt/temporary/* | sed "s/*//")
|
||||||
|
Loading…
Reference in New Issue
Block a user