Skip to content

Commit

Permalink
Merge pull request BastilleBSD#433 from cedwards/linux-pkg-support
Browse files Browse the repository at this point in the history
basic PKG support for ubuntu/debian containers
  • Loading branch information
cedwards authored Aug 1, 2021
2 parents cd93e13 + 03c830b commit fdc688b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions usr/local/share/bastille/pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ fi

for _jail in ${JAILS}; do
info "[${_jail}]:"
if [ -f "/usr/sbin/pkg" ]; then
jexec -l "${_jail}" /usr/sbin/pkg "$@"
bastille_jail_path=$(jls -j "${_jail}" path)
if [ -f "/usr/sbin/mport" ]; then
jexec -l -U root "${_jail}" /usr/sbin/mport "$@"
elif [ -f "${bastille_jail_path}/usr/bin/apt" ]; then
jexec -l "${_jail}" /usr/bin/apt "$@"
else
jexec -l "${_jail}" /usr/sbin/mport "$@"
jexec -l -U root "${_jail}" /usr/sbin/pkg "$@"
fi
echo
done

0 comments on commit fdc688b

Please sign in to comment.