mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-20 09:10:15 +01:00
update: set -d and -f for release updates and think jail updates
This commit is contained in:
@@ -96,6 +96,9 @@ jail_check() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
jail_update() {
|
jail_update() {
|
||||||
|
local _freebsd_update_conf="${bastille_jailsdir}/${TARGET}/root/etc/freebsd-update.conf"
|
||||||
|
local _jail_dir="${bastille_jailsdir}/${TARGET}/root"
|
||||||
|
local _workdir="${bastille_releasesdir}/${TARGET}/root/var/db/freebsd-update"
|
||||||
# Update a thick container
|
# Update a thick container
|
||||||
if [ -d "${bastille_jailsdir}/${TARGET}" ]; then
|
if [ -d "${bastille_jailsdir}/${TARGET}" ]; then
|
||||||
jail_check
|
jail_check
|
||||||
@@ -103,7 +106,9 @@ jail_update() {
|
|||||||
if [ -z "${CURRENT_VERSION}" ]; then
|
if [ -z "${CURRENT_VERSION}" ]; then
|
||||||
error_exit "Can't determine '${TARGET}' version."
|
error_exit "Can't determine '${TARGET}' version."
|
||||||
else
|
else
|
||||||
env PAGER="/bin/cat" freebsd-update ${OPTION} --not-running-from-cron -b "${bastille_jailsdir}/${TARGET}/root" \
|
env PAGER="/bin/cat" freebsd-update ${OPTION} --not-running-from-cron -b "${_jail_dir}" \
|
||||||
|
-d "${_workdir}" \
|
||||||
|
-f "${_freebsd_update_conf}" \
|
||||||
fetch install --currently-running "${CURRENT_VERSION}"
|
fetch install --currently-running "${CURRENT_VERSION}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -112,6 +117,9 @@ jail_update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
release_update() {
|
release_update() {
|
||||||
|
local _freebsd_update_conf="${bastille_releasesdir}/${TARGET}/etc/freebsd-update.conf"
|
||||||
|
local _release_dir="${bastille_releasesdir}/${TARGET}"
|
||||||
|
local _workdir="${bastille_releasesdir}/${TARGET}/var/db/freebsd-update"
|
||||||
# Update a release base(affects child containers)
|
# Update a release base(affects child containers)
|
||||||
if [ -d "${bastille_releasesdir}/${TARGET}" ]; then
|
if [ -d "${bastille_releasesdir}/${TARGET}" ]; then
|
||||||
TARGET_TRIM="${TARGET}"
|
TARGET_TRIM="${TARGET}"
|
||||||
@@ -120,8 +128,12 @@ release_update() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
env PAGER="/bin/cat" freebsd-update ${OPTION} --not-running-from-cron -b "${bastille_releasesdir}/${TARGET}" \
|
env PAGER="/bin/cat" freebsd-update ${OPTION} --not-running-from-cron -b "${bastille_releasesdir}/${TARGET}" \
|
||||||
|
-d "${_workdir}" \
|
||||||
|
-f "${_freebsd_update_conf}" \
|
||||||
fetch --currently-running "${TARGET_TRIM}"
|
fetch --currently-running "${TARGET_TRIM}"
|
||||||
env PAGER="/bin/cat" freebsd-update ${OPTION} --not-running-from-cron -b "${bastille_releasesdir}/${TARGET}" \
|
env PAGER="/bin/cat" freebsd-update ${OPTION} --not-running-from-cron -b "${bastille_releasesdir}/${TARGET}" \
|
||||||
|
-d "${_workdir}" \
|
||||||
|
-f "${_freebsd_update_conf}" \
|
||||||
install --currently-running "${TARGET_TRIM}"
|
install --currently-running "${TARGET_TRIM}"
|
||||||
else
|
else
|
||||||
error_exit "${TARGET} not found. See 'bastille bootstrap'."
|
error_exit "${TARGET} not found. See 'bastille bootstrap'."
|
||||||
|
|||||||
Reference in New Issue
Block a user