mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-04 11:43:48 +01:00
Merge pull request #282 from chriswells0/zfs-case
Use uppercase ZFS when appropriate.
This commit is contained in:
@@ -111,7 +111,7 @@ Available Commands:
|
||||
update Update container base -pX release.
|
||||
upgrade Upgrade container release to X.Y-RELEASE.
|
||||
verify Compare release against a "known good" index.
|
||||
zfs Manage (get|set) zfs attributes on targeted container(s).
|
||||
zfs Manage (get|set) ZFS attributes on targeted container(s).
|
||||
|
||||
Use "bastille -v|--version" for version information.
|
||||
Use "bastille command -h|--help" for more information about a command.
|
||||
|
||||
@@ -91,7 +91,7 @@ jail_export()
|
||||
if [ -n "${bastille_zfs_zpool}" ]; then
|
||||
FILE_EXT="xz"
|
||||
info "Exporting '${TARGET}' to a compressed .${FILE_EXT} archive."
|
||||
info "Sending zfs data stream..."
|
||||
info "Sending ZFS data stream..."
|
||||
# Take a recursive temporary snapshot
|
||||
zfs snapshot -r "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}@bastille_export_${DATE}"
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ validate_archive() {
|
||||
}
|
||||
|
||||
update_zfsmount() {
|
||||
# Update the mountpoint property on the received zfs data stream
|
||||
# Update the mountpoint property on the received ZFS data stream
|
||||
OLD_ZFS_MOUNTPOINT=$(zfs get -H mountpoint "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET_TRIM}/root" | awk '{print $3}')
|
||||
NEW_ZFS_MOUNTPOINT="${bastille_jailsdir}/${TARGET_TRIM}/root"
|
||||
if [ "${NEW_ZFS_MOUNTPOINT}" != "${OLD_ZFS_MOUNTPOINT}" ]; then
|
||||
@@ -343,7 +343,7 @@ jail_import() {
|
||||
elif [ "${FILE_EXT}" = ".zip" ]; then
|
||||
# Attempt to import a foreign/iocage container
|
||||
info "Importing '${TARGET_TRIM}' from foreign compressed ${FILE_EXT} archive."
|
||||
# Sane bastille zfs options
|
||||
# Sane bastille ZFS options
|
||||
ZFS_OPTIONS=$(echo ${bastille_zfs_options} | sed 's/-o//g')
|
||||
|
||||
# Extract required files from the zip archive
|
||||
|
||||
@@ -92,7 +92,7 @@ change_name() {
|
||||
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
||||
if [ -n "${bastille_zfs_zpool}" ] && [ -n "${bastille_zfs_prefix}" ]; then
|
||||
# Check and rename container ZFS dataset accordingly
|
||||
# Perform additional checks in case of non-zfs existing containers
|
||||
# Perform additional checks in case of non-ZFS existing containers
|
||||
if zfs list | grep -qw "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}"; then
|
||||
if ! zfs rename -f "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${NEWNAME}"; then
|
||||
error_exit "Can't rename '${TARGET}' dataset."
|
||||
@@ -115,7 +115,7 @@ change_name() {
|
||||
error_exit "Can't rename '${TARGET}' dataset."
|
||||
fi
|
||||
else
|
||||
error_exit "Can't determine the zfs origin path of '${TARGET}'."
|
||||
error_exit "Can't determine the ZFS origin path of '${TARGET}'."
|
||||
fi
|
||||
else
|
||||
# Just rename the jail directory
|
||||
|
||||
Reference in New Issue
Block a user