diff patches applied to resolve errors on setup.sh and bootstrap.sh

This commit is contained in:
Eva Winterschön
2023-12-25 11:39:02 -08:00
parent 3a4ebc63bb
commit 19c8c021c4
2 changed files with 16 additions and 6 deletions

View File

@@ -212,6 +212,11 @@ bootstrap_directories() {
}
bootstrap_release() {
# Make sure to check/bootstrap directories first.¬
NOCACHEDIR=1
RELEASE="${DIR_BOOTSTRAP}"
bootstrap_directories
## if release exists quit, else bootstrap additional distfiles
if [ -f "${bastille_releasesdir}/${RELEASE}/COPYRIGHT" ]; then
## check distfiles list and skip existing cached files

View File

@@ -28,8 +28,9 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bastille_config="/usr/local/etc/bastille/bastille.conf"
. /usr/local/share/bastille/common.sh
. /usr/local/etc/bastille/bastille.conf
. ${bastille_config}
usage() {
error_exit "Usage: bastille setup [pf|bastille0|zfs|vnet]"
@@ -111,8 +112,12 @@ configure_zfs() {
else
## attempt to determine bastille_zroot from `zpool list`
bastille_zroot=$(zpool list | grep -v NAME | awk '{print $1}')
sysrc -f "${bastille_prefix}/bastille.conf" bastille_zfs_enable=YES
sysrc -f "${bastille_prefix}/bastille.conf" bastille_zfs_zpool="${bastille_zroot}"
zfs create ${bastille_zfs_options} -o mountpoint=${bastille_prefix} ${bastille_zroot}/bastille || \
error_exit "Failed to create zfs dataset 'bastille' in pool '${bastille_zroot}'"
chown root:root ${bastille_prefix}
chmod 0750 ${bastille_prefix}
sysrc -f "${bastille_config}" bastille_zfs_enable=YES
sysrc -f "${bastille_config}" bastille_zfs_zpool="${bastille_zroot}"
fi
}