mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-23 18:50:46 +01:00
Simplify grep search, add full path to jexec
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
. /usr/local/etc/bastille/bastille.conf
|
. /usr/local/etc/bastille/bastille.conf
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo -e "${COLOR_RED}Usage: bastille update release.${COLOR_RESET}"
|
echo -e "${COLOR_RED}Usage: bastille update release | container.${COLOR_RESET}"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,10 +56,10 @@ if [ ! -z "$(freebsd-version | grep -i HBSD)" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "${bastille_jailsdir}/${TARGET}" ]; then
|
if [ -d "${bastille_jailsdir}/${TARGET}" ]; then
|
||||||
if ! cat "${bastille_jailsdir}/${TARGET}/fstab" 2>/dev/null | grep -w "${TARGET}" | grep -q ".bastille"; then
|
if ! grep -qw ".bastille" "${bastille_jailsdir}/${TARGET}/fstab"; then
|
||||||
if [ "$(jls name | grep -w "${TARGET}")" ]; then
|
if [ "$(jls name | grep -w "${TARGET}")" ]; then
|
||||||
# Update a thick container.
|
# Update a thick container.
|
||||||
CURRENT_VERSION=$(jexec -l ${TARGET} freebsd-version 2>/dev/null)
|
CURRENT_VERSION=$(/usr/sbin/jexec -l ${TARGET} freebsd-version 2>/dev/null)
|
||||||
if [ -z "${CURRENT_VERSION}" ]; then
|
if [ -z "${CURRENT_VERSION}" ]; then
|
||||||
echo -e "${COLOR_RED}Can't determine '${TARGET}' version.${COLOR_RESET}"
|
echo -e "${COLOR_RED}Can't determine '${TARGET}' version.${COLOR_RESET}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user