mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-06 04:34:19 +01:00
Update common.sh
This commit is contained in:
@@ -296,40 +296,42 @@ set_target_single() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# This function is run immediately
|
# This function is run immediately
|
||||||
set_zfs_mountpoints() {
|
set_bastille_mountpoints() {
|
||||||
|
|
||||||
# We have to do this if ALTROOT is enabled/present
|
if checkyesno bastille_zfs_enable; then
|
||||||
local _altroot="$(zpool get -Ho value altroot ${bastille_zfs_zpool})"
|
|
||||||
|
|
||||||
# Set mountpoints to *bastille*dir*
|
# We have to do this if ALTROOT is enabled/present
|
||||||
# shellcheck disable=SC2034
|
local _altroot="$(zpool get -Ho value altroot ${bastille_zfs_zpool})"
|
||||||
bastille_prefix_mountpoint="${bastille_prefix}"
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
bastille_backupsdir_mountpoint="${bastille_backupsdir}"
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
bastille_cachedir_mountpoint="${bastille_cachedir}"
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
bastille_jailsdir_mountpoint="${bastille_jailsdir}"
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
bastille_releasesdir_mountpoint="${bastille_releasesdir}"
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
bastille_templatesdir_mountpoint="${bastille_templatesdir}"
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
bastille_logsdir_mountpoint="${bastille_logsdir}"
|
|
||||||
|
|
||||||
# Add _altroot to *dir* if set
|
# Set mountpoints to *bastille*dir*
|
||||||
if [ "${_altroot}" != "-" ]; then
|
# shellcheck disable=SC2034
|
||||||
# Set *dir* to include ALTROOT
|
bastille_prefix_mountpoint="${bastille_prefix}"
|
||||||
bastille_prefix="${_altroot}${bastille_prefix}"
|
# shellcheck disable=SC2034
|
||||||
bastille_backupsdir="${_altroot}${bastille_backupsdir}"
|
bastille_backupsdir_mountpoint="${bastille_backupsdir}"
|
||||||
bastille_cachedir="${_altroot}${bastille_cachedir}"
|
# shellcheck disable=SC2034
|
||||||
bastille_jailsdir="${_altroot}${bastille_jailsdir}"
|
bastille_cachedir_mountpoint="${bastille_cachedir}"
|
||||||
bastille_releasesdir="${_altroot}${bastille_releasesdir}"
|
# shellcheck disable=SC2034
|
||||||
bastille_templatesdir="${_altroot}${bastille_templatesdir}"
|
bastille_jailsdir_mountpoint="${bastille_jailsdir}"
|
||||||
bastille_logsdir="${_altroot}${bastille_logsdir}"
|
# shellcheck disable=SC2034
|
||||||
|
bastille_releasesdir_mountpoint="${bastille_releasesdir}"
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
bastille_templatesdir_mountpoint="${bastille_templatesdir}"
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
bastille_logsdir_mountpoint="${bastille_logsdir}"
|
||||||
|
|
||||||
|
# Add _altroot to *dir* if set
|
||||||
|
if [ "${_altroot}" != "-" ]; then
|
||||||
|
# Set *dir* to include ALTROOT
|
||||||
|
bastille_prefix="${_altroot}${bastille_prefix}"
|
||||||
|
bastille_backupsdir="${_altroot}${bastille_backupsdir}"
|
||||||
|
bastille_cachedir="${_altroot}${bastille_cachedir}"
|
||||||
|
bastille_jailsdir="${_altroot}${bastille_jailsdir}"
|
||||||
|
bastille_releasesdir="${_altroot}${bastille_releasesdir}"
|
||||||
|
bastille_templatesdir="${_altroot}${bastille_templatesdir}"
|
||||||
|
bastille_logsdir="${_altroot}${bastille_logsdir}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
set_zfs_mountpoints
|
|
||||||
|
|
||||||
target_all_jails() {
|
target_all_jails() {
|
||||||
local _JAILS="$(bastille list jails)"
|
local _JAILS="$(bastille list jails)"
|
||||||
@@ -541,3 +543,5 @@ checkyesno() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_bastille_mountpoints
|
||||||
Reference in New Issue
Block a user