From 12a9b7669212a0cd009de12e8728bbca886b5498 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sun, 20 Apr 2025 17:17:13 -0600 Subject: [PATCH] bootstrap: Ensure proper bastille_prefix mounting if the directory exists --- usr/local/share/bastille/bootstrap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr/local/share/bastille/bootstrap.sh b/usr/local/share/bastille/bootstrap.sh index 5cfcfac0..68a7dea2 100644 --- a/usr/local/share/bastille/bootstrap.sh +++ b/usr/local/share/bastille/bootstrap.sh @@ -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}