Add ability to convert "hook" files to Bastillefile format.

This commit is contained in:
Chris Wells
2020-11-28 17:21:44 -05:00
parent a9ea02b743
commit 554f2293c1
3 changed files with 66 additions and 9 deletions

View File

@@ -153,6 +153,9 @@ clone|cmd|console|convert|cp|edit|export|htop|limits|mount|pkg|rename|service|st
JAILS="${JAILS} ${_jail}"
fi
done
elif [ "${CMD}" = 'template' ] && [ "${TARGET}" = '--convert' ]; then
# This command does not act on a jail, so we are temporarily bypassing the presence/started
# checks. The command will simply convert a template from hooks to a Bastillefile. -- cwells
else
JAILS=$(jls name | awk "/^${TARGET}$/")