Merge pull request #282 from chriswells0/zfs-case

Use uppercase ZFS when appropriate.
This commit is contained in:
Christer Edwards
2020-11-28 11:05:09 -07:00
committed by GitHub
6 changed files with 12 additions and 12 deletions

View File

@@ -72,7 +72,7 @@ Available Commands:
update Update container base -pX release. update Update container base -pX release.
upgrade Upgrade container release to X.Y-RELEASE. upgrade Upgrade container release to X.Y-RELEASE.
verify Verify bootstrapped release or automation template. verify Verify bootstrapped release or automation template.
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 -v|--version" for version information.
Use "bastille command -h|--help" for more information about a command. Use "bastille command -h|--help" for more information about a command.
@@ -936,7 +936,7 @@ validation are not used.
bastille zfs bastille zfs
------------ ------------
This sub-command allows managing zfs attributes for the targeted container(s). This sub-command allows managing ZFS attributes for the targeted container(s).
Common usage includes setting container quotas. Common usage includes setting container quotas.
**set quota** **set quota**
@@ -962,7 +962,7 @@ Note: On UFS systems containers must be stopped before export.
```shell ```shell
ishmael ~ # bastille export folsom ishmael ~ # bastille export folsom
Exporting 'folsom' to a compressed .xz archive. Exporting 'folsom' to a compressed .xz archive.
Sending zfs data stream... Sending ZFS data stream...
100 % 1057.2 KiB / 9231.5 KiB = 0.115 0:01 100 % 1057.2 KiB / 9231.5 KiB = 0.115 0:01
Exported '/usr/local/bastille/jails/backups/folsom_2020-01-26-19:23:04.xz' successfully. Exported '/usr/local/bastille/jails/backups/folsom_2020-01-26-19:23:04.xz' successfully.
@@ -977,7 +977,7 @@ ishmael ~ # bastille import folsom_2020-01-26-19:22:23.xz
Validating file: folsom_2020-01-26-19:22:23.xz... Validating file: folsom_2020-01-26-19:22:23.xz...
File validation successful! File validation successful!
Importing 'folsom' from compressed .xz archive. Importing 'folsom' from compressed .xz archive.
Receiving zfs data stream... Receiving ZFS data stream...
/usr/local/bastille/jails/backups/folsom_2020-01-26-19:22:23.xz (1/1) /usr/local/bastille/jails/backups/folsom_2020-01-26-19:22:23.xz (1/1)
100 % 626.4 KiB / 9231.5 KiB = 0.068 0:02 100 % 626.4 KiB / 9231.5 KiB = 0.068 0:02
Container 'folsom' imported successfully. Container 'folsom' imported successfully.

View File

@@ -40,7 +40,7 @@ Usage
update Update container base -pX release. update Update container base -pX release.
upgrade Upgrade container release to X.Y-RELEASE. upgrade Upgrade container release to X.Y-RELEASE.
verify Compare release against a "known good" index. 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 -v|--version" for version information.
Use "bastille command -h|--help" for more information about a command. Use "bastille command -h|--help" for more information about a command.

View File

@@ -111,7 +111,7 @@ Available Commands:
update Update container base -pX release. update Update container base -pX release.
upgrade Upgrade container release to X.Y-RELEASE. upgrade Upgrade container release to X.Y-RELEASE.
verify Compare release against a "known good" index. 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 -v|--version" for version information.
Use "bastille command -h|--help" for more information about a command. Use "bastille command -h|--help" for more information about a command.

View File

@@ -91,7 +91,7 @@ jail_export()
if [ -n "${bastille_zfs_zpool}" ]; then if [ -n "${bastille_zfs_zpool}" ]; then
FILE_EXT="xz" FILE_EXT="xz"
info "Exporting '${TARGET}' to a compressed .${FILE_EXT} archive." info "Exporting '${TARGET}' to a compressed .${FILE_EXT} archive."
info "Sending zfs data stream..." info "Sending ZFS data stream..."
# Take a recursive temporary snapshot # Take a recursive temporary snapshot
zfs snapshot -r "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}@bastille_export_${DATE}" zfs snapshot -r "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}@bastille_export_${DATE}"

View File

@@ -79,7 +79,7 @@ validate_archive() {
} }
update_zfsmount() { 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}') 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" NEW_ZFS_MOUNTPOINT="${bastille_jailsdir}/${TARGET_TRIM}/root"
if [ "${NEW_ZFS_MOUNTPOINT}" != "${OLD_ZFS_MOUNTPOINT}" ]; then if [ "${NEW_ZFS_MOUNTPOINT}" != "${OLD_ZFS_MOUNTPOINT}" ]; then
@@ -343,7 +343,7 @@ jail_import() {
elif [ "${FILE_EXT}" = ".zip" ]; then elif [ "${FILE_EXT}" = ".zip" ]; then
# Attempt to import a foreign/iocage container # Attempt to import a foreign/iocage container
info "Importing '${TARGET_TRIM}' from foreign compressed ${FILE_EXT} archive." 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') ZFS_OPTIONS=$(echo ${bastille_zfs_options} | sed 's/-o//g')
# Extract required files from the zip archive # Extract required files from the zip archive

View File

@@ -92,7 +92,7 @@ change_name() {
if [ "${bastille_zfs_enable}" = "YES" ]; then if [ "${bastille_zfs_enable}" = "YES" ]; then
if [ -n "${bastille_zfs_zpool}" ] && [ -n "${bastille_zfs_prefix}" ]; then if [ -n "${bastille_zfs_zpool}" ] && [ -n "${bastille_zfs_prefix}" ]; then
# Check and rename container ZFS dataset accordingly # 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 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 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." error_exit "Can't rename '${TARGET}' dataset."
@@ -115,7 +115,7 @@ change_name() {
error_exit "Can't rename '${TARGET}' dataset." error_exit "Can't rename '${TARGET}' dataset."
fi fi
else else
error_exit "Can't determine the zfs origin path of '${TARGET}'." error_exit "Can't determine the ZFS origin path of '${TARGET}'."
fi fi
else else
# Just rename the jail directory # Just rename the jail directory