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