jls path fix + support using host package manager

This commit is contained in:
Christer Edwards
2021-12-23 13:57:18 -07:00
parent d3d5bf2df4
commit e21d31518a
2 changed files with 17 additions and 5 deletions

View File

@@ -31,7 +31,7 @@
. /usr/local/share/bastille/common.sh
usage() {
error_exit "Usage: bastille pkg TARGET command [args]"
error_exit "Usage: bastille pkg [-P|--pkg] TARGET command [args]"
}
# Handle special-case commands first.
@@ -52,6 +52,8 @@ for _jail in ${JAILS}; do
jexec -l -U root "${_jail}" /usr/sbin/mport "$@"
elif [ -f "${bastille_jail_path}/usr/bin/apt" ]; then
jexec -l "${_jail}" /usr/bin/apt "$@"
elif [ "${USE_HOST_PKG}" = 1 ]; then
/usr/sbin/pkg -j "${_jail}" "$@"
else
jexec -l -U root "${_jail}" /usr/sbin/pkg "$@"
fi