CREATE.SH::ADDED:: New '--no-validate' parameter to use custom/manually bootstrapped releases

This commit is contained in:
Théo Bertin
2023-12-08 11:21:31 +01:00
parent 6d149f6f52
commit c79ff1d5ce

View File

@@ -634,6 +634,7 @@ CLONE_JAIL=""
VNET_JAIL=""
LINUX_JAIL=""
STATIC_MAC=""
VALIDATE_RELEASE="1"
# Handle and parse options
while [ $# -gt 0 ]; do
@@ -711,6 +712,10 @@ while [ $# -gt 0 ]; do
VNET_JAIL_BRIDGE="1"
shift
;;
--no-validate|no-validate)
VALIDATE_RELEASE=""
shift
;;
--*|-*)
error_notify "Unknown Option."
usage
@@ -754,7 +759,7 @@ if [ -n "${NAME}" ]; then
validate_name
fi
if [ -n "${LINUX_JAIL}" ]; then
if [ -n "${LINUX_JAIL}" ] && [ -n "${VALIDATE_RELEASE}" ]; then
case "${RELEASE}" in
bionic|ubuntu_bionic|ubuntu|ubuntu-bionic)
## check for FreeBSD releases name
@@ -788,6 +793,7 @@ if [ -n "${LINUX_JAIL}" ]; then
fi
if [ -z "${EMPTY_JAIL}" ]; then
if [ -n "${VALIDATE_RELEASE}" ]; then
## verify release
case "${RELEASE}" in
2.[0-9]*)
@@ -862,6 +868,7 @@ if [ -z "${EMPTY_JAIL}" ]; then
usage
;;
esac
fi
## check for name/root/.bastille
if [ -d "${bastille_jailsdir}/${NAME}/root/.bastille" ]; then