From 8938d03f47304fb512090ed54e0e455d5a28648c Mon Sep 17 00:00:00 2001 From: JRGTH Date: Wed, 7 Jul 2021 05:21:28 -0400 Subject: [PATCH] Revert to original file before re-add new --- usr/local/share/bastille/create.sh | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index 2f56c092..e46109e0 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -438,36 +438,32 @@ EMPTY_JAIL="" THICK_JAIL="" VNET_JAIL="" -# Handle and parse options -while [ $# -gt 0 ]; do +## handle combined options then shift +if [ "${1}" = "-T" -o "${1}" = "--thick" -o "${1}" = "thick" ] && \ + [ "${2}" = "-V" -o "${2}" = "--vnet" -o "${2}" = "vnet" ]; then + THICK_JAIL="1" + VNET_JAIL="1" + shift 2 +else + ## handle single options case "${1}" in -E|--empty|empty) - EMPTY_JAIL="1" shift + EMPTY_JAIL="1" ;; -T|--thick|thick) - THICK_JAIL="1" shift + THICK_JAIL="1" ;; -V|--vnet|vnet) - VNET_JAIL="1" shift + VNET_JAIL="1" ;; - -*|--*) + -*) error_notify "Unknown Option." usage ;; - *) - break - ;; esac -done - -## validate for combined options -if [ -n "${EMPTY_JAIL}" ]; then - if [ -n "${THICK_JAIL}" ] || [ -n "${VNET_JAIL}" ]; then - error_exit "Error: Empty jail option can't be used with other options." - fi fi NAME="$1"