Ensure target is specified and exists in 1 place instead of many.

Require target to be running for commands that need it.
Closes #239.
This commit is contained in:
Chris Wells
2020-08-30 15:37:54 -04:00
parent aaffc882f9
commit c6aded8d0a
20 changed files with 162 additions and 320 deletions

View File

@@ -44,18 +44,7 @@ esac
if [ $# -lt 2 ]; then
usage
fi
TARGET=$1
shift
if [ "${TARGET}" = 'ALL' ]; then
JAILS=$(jls name)
else
JAILS=$(jls name | awk "/^${TARGET}$/")
fi
if [ $# -eq 2 ]; then
elif [ $# -eq 2 ]; then
_fstab="$@ nullfs ro 0 0"
else
_fstab="$@"