bootstrap: Ensure proper bastille_prefix mounting if the directory exists

This commit is contained in:
tschettervictor
2025-04-20 17:17:13 -06:00
committed by GitHub
parent cc3963a8fd
commit 12a9b76692

View File

@@ -78,6 +78,11 @@ bootstrap_directories() {
mkdir -p "${bastille_prefix}"
fi
chmod 0750 "${bastille_prefix}"
# Make sure the dataset is mounted in the proper place
elif [ -d "${bastille_prefix}" ]; then
if [ "$(zfs get -H -o value mountpoint ${bastille_zfs_zpool}/${bastille_zfs_prefix})" != "${bastille_prefix}" ]; then
zfs set mountpoint="${bastille_prefix}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}"
fi
fi
## ${bastille_backupsdir}