Merge pull request #650 from em-winterschon/fbsd-140R-setup-bootstrap-fixes
diff patches applied to resolve errors on setup.sh and bootstrap.sh
This commit is contained in:
@@ -212,6 +212,11 @@ bootstrap_directories() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bootstrap_release() {
|
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 release exists quit, else bootstrap additional distfiles
|
||||||
if [ -f "${bastille_releasesdir}/${RELEASE}/COPYRIGHT" ]; then
|
if [ -f "${bastille_releasesdir}/${RELEASE}/COPYRIGHT" ]; then
|
||||||
## check distfiles list and skip existing cached files
|
## check distfiles list and skip existing cached files
|
||||||
|
|||||||
@@ -28,8 +28,9 @@
|
|||||||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
# 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.
|
# 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/share/bastille/common.sh
|
||||||
. /usr/local/etc/bastille/bastille.conf
|
. ${bastille_config}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
error_exit "Usage: bastille setup [pf|bastille0|zfs|vnet]"
|
error_exit "Usage: bastille setup [pf|bastille0|zfs|vnet]"
|
||||||
@@ -111,8 +112,12 @@ configure_zfs() {
|
|||||||
else
|
else
|
||||||
## attempt to determine bastille_zroot from `zpool list`
|
## attempt to determine bastille_zroot from `zpool list`
|
||||||
bastille_zroot=$(zpool list | grep -v NAME | awk '{print $1}')
|
bastille_zroot=$(zpool list | grep -v NAME | awk '{print $1}')
|
||||||
sysrc -f "${bastille_prefix}/bastille.conf" bastille_zfs_enable=YES
|
zfs create ${bastille_zfs_options} -o mountpoint=${bastille_prefix} ${bastille_zroot}/bastille || \
|
||||||
sysrc -f "${bastille_prefix}/bastille.conf" bastille_zfs_zpool="${bastille_zroot}"
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user