mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-21 17:52:01 +01:00
Merge pull request #1191 from BastilleBSD/tschettervictor-patch-1
This commit is contained in:
@@ -5,8 +5,12 @@ Bastille uses a ``subcommand TARGET ARGS`` syntax, meaning that each command
|
|||||||
requires a target. Targets are usually containers, but can also be releases.
|
requires a target. Targets are usually containers, but can also be releases.
|
||||||
|
|
||||||
Targeting a container is done by providing the exact jail name, the JID of the
|
Targeting a container is done by providing the exact jail name, the JID of the
|
||||||
jail, or by typing the starting few characters of a jail. If more than one
|
jail, a tag, or by typing the starting few characters of a jail. If more than one
|
||||||
matching jail will be found, you will see a message saying so.
|
matching jail is found, you will see an error saying so.
|
||||||
|
|
||||||
|
If you use a tag as the TARGET, Bastille will target any and all jail(s) that have
|
||||||
|
the tag assigned. If you have a jail with the same name as the tag you are trying to
|
||||||
|
target, Bastille will target the jail, and not the tag.
|
||||||
|
|
||||||
Targeting a release is done by providing the exact release name. (Note: do not
|
Targeting a release is done by providing the exact release name. (Note: do not
|
||||||
include the ``-pX`` point-release version.)
|
include the ``-pX`` point-release version.)
|
||||||
|
|||||||
@@ -249,7 +249,11 @@ set_target() {
|
|||||||
if jail_autocomplete "${_jail}" > /dev/null; then
|
if jail_autocomplete "${_jail}" > /dev/null; then
|
||||||
_jail="$(jail_autocomplete ${_jail})"
|
_jail="$(jail_autocomplete ${_jail})"
|
||||||
elif [ $? -eq 2 ]; then
|
elif [ $? -eq 2 ]; then
|
||||||
error_continue "Jail not found \"${_jail}\""
|
if grep -Ehoqw ${_jail} ${bastille_jailsdir}/*/tags; then
|
||||||
|
_jail="$(grep -Eow ${_jail} ${bastille_jailsdir}/*/tags | awk -F"/tags" '{print $1}' | sed "s#${bastille_jailsdir}/##g" | tr '\n' ' ')"
|
||||||
|
else
|
||||||
|
error_continue "Jail not found \"${_jail}\""
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user