server10: fix microvm-zfs-datasets@.service

This commit is contained in:
Astro 2022-06-16 22:18:04 +02:00
parent 5390bacd5b
commit 9fc5921a1e
1 changed files with 5 additions and 3 deletions

View File

@ -41,9 +41,11 @@
for d in current/share/microvm/virtiofs/*; do
SOURCE=$(cat $d/source)
TAG=$(basename $d)
MNT=$(pwd)$SOURCE
zfsExists $BASE/$NAME/$TAG || \
zfs create -o mountpoint=$MNT $BASE/$NAME/$TAG
MNT=$SOURCE
if [[ "$MNT" == /var/lib/microvms/$NAME/* ]]; then
zfsExists $BASE/$NAME/$TAG || \
zfs create -o mountpoint=$MNT $BASE/$NAME/$TAG
fi
done
'';
};