From fb3011b77e1c34f85bc95c3891721cacdc701e6b Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Thu, 8 May 2025 11:56:53 -0600 Subject: [PATCH] setup: check migrate perms --- usr/local/share/bastille/setup.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/usr/local/share/bastille/setup.sh b/usr/local/share/bastille/setup.sh index 8ca0936e..b6f431bf 100644 --- a/usr/local/share/bastille/setup.sh +++ b/usr/local/share/bastille/setup.sh @@ -87,6 +87,23 @@ configure_filesystem() { chmod 0750 "${bastille_backupsdir}" fi + ## ${bastille_migratedir} + if [ ! -d "${bastille_migratedir}" ]; then + if checkyesno bastille_zfs_enable; then + if [ -n "${bastille_zfs_zpool}" ]; then + zfs create ${bastille_zfs_options} -o mountpoint="${bastille_migratedir}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/migrate" + fi + else + mkdir -p "${bastille_migratedir}" + fi + chmod 777 "${bastille_migratedir}" + fi + + # Migrate needs 777 + if [ "$(stat -f %Lp ${bastille_migratedir})" -ne "777" ]; then + chmod 777 "${bastille_migratedir}" + fi + ## ${bastille_cachedir} if [ ! -d "${bastille_cachedir}" ]; then if checkyesno bastille_zfs_enable; then @@ -141,18 +158,6 @@ configure_filesystem() { mkdir -p "${bastille_releasesdir}" fi fi - - ## ${bastille_migratedir} - if [ ! -d "${bastille_migratedir}" ]; then - if checkyesno bastille_zfs_enable; then - if [ -n "${bastille_zfs_zpool}" ]; then - zfs create ${bastille_zfs_options} -o mountpoint="${bastille_migratedir}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/migrate" - fi - else - mkdir -p "${bastille_migratedir}" - fi - chmod 777 "${bastille_migratedir}" - fi } # Configure netgraph