mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-23 18:50:46 +01:00
Merge pull request #1011 from BastilleBSD/tschettervictor-patch-3
list: Fix listing release when jail is down
This commit is contained in:
@@ -220,8 +220,8 @@ get_jail_info() {
|
|||||||
# Get jail release (FreeBSD or Linux)
|
# Get jail release (FreeBSD or Linux)
|
||||||
if [ -n "${JAIL_PATH}" ]; then
|
if [ -n "${JAIL_PATH}" ]; then
|
||||||
if [ "${IS_FREEBSD_JAIL}" -eq 1 ]; then
|
if [ "${IS_FREEBSD_JAIL}" -eq 1 ]; then
|
||||||
if [ -f "${JAIL_PATH}/root/bin/freebsd-version" ]; then
|
if [ -f "${JAIL_PATH}/bin/freebsd-version" ]; then
|
||||||
JAIL_RELEASE=$(grep -Ehs "^USERLAND_VERSION=" "${JAIL_PATH}/root/bin/freebsd-version" 2> /dev/null | sed "s/[\"\'\^]//g;s/ .*$//g" | sed -n "s/^USERLAND_VERSION=\(.*\)$/\1/p")
|
JAIL_RELEASE=$(grep -Ehs "^USERLAND_VERSION=" "${JAIL_PATH}/bin/freebsd-version" 2> /dev/null | sed "s/[\"\'\^]//g;s/ .*$//g" | sed -n "s/^USERLAND_VERSION=\(.*\)$/\1/p")
|
||||||
else
|
else
|
||||||
JAIL_RELEASE=$(grep -hs "/releases/.*/root/.bastille.*nullfs" "${bastille_jailsdir}/${JAIL_NAME}/fstab" 2> /dev/null | grep -Ehs "^USERLAND_VERSION=" "$(sed -n "s/^\(.*\) \/.*$/\1\/bin\/freebsd-version/p" | awk '!_[$0]++')" | sed "s/[\"\'\^]//g;s/ .*$//g" | sed -n "s/^USERLAND_VERSION=\(.*\)$/\1/p")
|
JAIL_RELEASE=$(grep -hs "/releases/.*/root/.bastille.*nullfs" "${bastille_jailsdir}/${JAIL_NAME}/fstab" 2> /dev/null | grep -Ehs "^USERLAND_VERSION=" "$(sed -n "s/^\(.*\) \/.*$/\1\/bin\/freebsd-version/p" | awk '!_[$0]++')" | sed "s/[\"\'\^]//g;s/ .*$//g" | sed -n "s/^USERLAND_VERSION=\(.*\)$/\1/p")
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user