Create info() and warn() for cleaner print statements.

This commit is contained in:
Chris Wells
2020-11-25 21:19:08 -05:00
parent 3c79e1d82b
commit 8b4d18f8f3
26 changed files with 118 additions and 110 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ update_fstab() {
change_name() {
# Attempt container name change
echo -e "${COLOR_GREEN}Attempting to rename '${TARGET}' to ${NEWNAME}...${COLOR_RESET}"
info "Attempting to rename '${TARGET}' to ${NEWNAME}..."
if [ "${bastille_zfs_enable}" = "YES" ]; then
if [ -n "${bastille_zfs_zpool}" ] && [ -n "${bastille_zfs_prefix}" ]; then
# Check and rename container ZFS dataset accordingly
@@ -131,7 +131,7 @@ change_name() {
if [ "$?" -ne 0 ]; then
error_exit "An error has occurred while attempting to rename '${TARGET}'."
else
echo -e "${COLOR_GREEN}Renamed '${TARGET}' to '${NEWNAME}' successfully.${COLOR_RESET}"
info "Renamed '${TARGET}' to '${NEWNAME}' successfully."
fi
}