mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-22 10:10:46 +01:00
minor fixes
This commit is contained in:
@@ -426,7 +426,9 @@ http?://github.com/*/*|http?://gitlab.com/*/*)
|
|||||||
BASTILLE_TEMPLATE_REPO=$(echo "${1}" | awk -F / '{ print $5 }')
|
BASTILLE_TEMPLATE_REPO=$(echo "${1}" | awk -F / '{ print $5 }')
|
||||||
bootstrap_template
|
bootstrap_template
|
||||||
;;
|
;;
|
||||||
|
#adding Ubuntu Bionic as valid "RELEASE" for POC @hackacad
|
||||||
ubuntu_bionic|bionic|ubuntu-bionic)
|
ubuntu_bionic|bionic|ubuntu-bionic)
|
||||||
|
#check and install OS dependencies @hackacad
|
||||||
if [ ! "$(sysrc -f /boot/loader.conf -n linprocfs_load)" = "YES" ] && [ ! "$(sysrc -f /boot/loader.conf -n linsysfs_load)" = "YES" ] && [ ! "$(sysrc -f /boot/loader.conf -n tmpfs_load)" = "YES" ]; then
|
if [ ! "$(sysrc -f /boot/loader.conf -n linprocfs_load)" = "YES" ] && [ ! "$(sysrc -f /boot/loader.conf -n linsysfs_load)" = "YES" ] && [ ! "$(sysrc -f /boot/loader.conf -n tmpfs_load)" = "YES" ]; then
|
||||||
warn "linprocfs_load, linsysfs_load, tmpfs_load not enabled in /boot/loader.conf or linux_enable not active. Should I do that for you? (N|y)"
|
warn "linprocfs_load, linsysfs_load, tmpfs_load not enabled in /boot/loader.conf or linux_enable not active. Should I do that for you? (N|y)"
|
||||||
read answer
|
read answer
|
||||||
@@ -435,6 +437,9 @@ ubuntu_bionic|bionic|ubuntu-bionic)
|
|||||||
error_exit "Exiting."
|
error_exit "Exiting."
|
||||||
;;
|
;;
|
||||||
yes|Yes|y|Y)
|
yes|Yes|y|Y)
|
||||||
|
info "Loading modules"
|
||||||
|
kldload linux linux64 linprocfs linsysfs tmpfs
|
||||||
|
info "Persisting modules"
|
||||||
sysrc linux_enable=YES
|
sysrc linux_enable=YES
|
||||||
sysrc -f /boot/loader.conf linprocfs_load=YES
|
sysrc -f /boot/loader.conf linprocfs_load=YES
|
||||||
sysrc -f /boot/loader.conf linsysfs_load=YES
|
sysrc -f /boot/loader.conf linsysfs_load=YES
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ create_jail() {
|
|||||||
if [ -n "${bastille_template_empty}" ]; then
|
if [ -n "${bastille_template_empty}" ]; then
|
||||||
bastille template "${NAME}" ${bastille_template_empty} --arg BASE_TEMPLATE="${bastille_template_base}" --arg HOST_RESOLV_CONF="${bastille_resolv_conf}"
|
bastille template "${NAME}" ${bastille_template_empty} --arg BASE_TEMPLATE="${bastille_template_base}" --arg HOST_RESOLV_CONF="${bastille_resolv_conf}"
|
||||||
fi
|
fi
|
||||||
## Using templating function to fetch neccesary packges @hackacad
|
## Using templating function to fetch necessary packges @hackacad
|
||||||
elif [ -n "${LINUX_JAIL}" ]; then
|
elif [ -n "${LINUX_JAIL}" ]; then
|
||||||
info "Fetchting packages..."
|
info "Fetchting packages..."
|
||||||
#jexec -l "${NAME}" /bin/bash -c "export DEBIAN_FRONTEND=noninteractive" #SRDEBUG
|
#jexec -l "${NAME}" /bin/bash -c "export DEBIAN_FRONTEND=noninteractive" #SRDEBUG
|
||||||
@@ -681,4 +681,4 @@ if [ -z ${bastille_template_vnet+x} ]; then
|
|||||||
bastille_template_vnet='default/vnet'
|
bastille_template_vnet='default/vnet'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
create_jail "${NAME}" "${RELEASE}" "${IP}" "${INTERFACE}"
|
create_jail "${NAME}" "${RELEASE}" "${IP}" "${INTERFACE}"
|
||||||
|
|||||||
Reference in New Issue
Block a user