server10: fix microvm-zfs-datasets@.service

This commit is contained in:
Astro 2022-06-16 22:18:04 +02:00
parent 5390bacd5b
commit 9fc5921a1e

View File

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