From 23b96bd82aa0843838072230a04af231c5b0e2cd Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 8 Dec 2019 17:46:15 -0400 Subject: [PATCH] Minor code cleanup/formatting --- usr/local/share/bastille/bootstrap.sh | 2 +- usr/local/share/bastille/create.sh | 2 +- usr/local/share/bastille/destroy.sh | 2 +- usr/local/share/bastille/list.sh | 3 +-- usr/local/share/bastille/template.sh | 4 ++-- usr/local/share/bastille/verify.sh | 4 ++-- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/usr/local/share/bastille/bootstrap.sh b/usr/local/share/bastille/bootstrap.sh index e812cfcb..e1799921 100644 --- a/usr/local/share/bastille/bootstrap.sh +++ b/usr/local/share/bastille/bootstrap.sh @@ -49,7 +49,7 @@ if [ "${bastille_zfs_enable}" = "YES" ]; then if [ -z "${bastille_zfs_zpool}" ]; then echo -e "${COLOR_RED}ERROR: Missing ZFS parameters, see bastille_zfs_zpool.${COLOR_RESET}" exit 1 - elif [ -z "${bastille_zfs_prefix}" ]; then + elif [ -z "${bastille_zfs_prefix}" ]; then echo -e "${COLOR_RED}ERROR: Missing ZFS parameters, see bastille_zfs_prefix.${COLOR_RESET}" exit 1 elif ! zfs list "${bastille_zfs_zpool}" > /dev/null 2>&1; then diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index fe8fd755..e4725462 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -71,7 +71,7 @@ validate_netif() { } validate_netconf() { - if [ -n "${bastille_jail_loopback}" ] && [ -n "${bastille_jail_interface}" ] && [ -n "${bastille_jail_external}" ]; then + if [ -n "${bastille_jail_loopback}" ] && [ -n "${bastille_jail_interface}" ] && [ -n "${bastille_jail_external}" ]; then echo -e "${COLOR_RED}Invalid network configuration.${COLOR_RESET}" exit 1 fi diff --git a/usr/local/share/bastille/destroy.sh b/usr/local/share/bastille/destroy.sh index 5f2659bb..0fd81112 100644 --- a/usr/local/share/bastille/destroy.sh +++ b/usr/local/share/bastille/destroy.sh @@ -85,7 +85,7 @@ destroy_rel() { ## check if this release have containers child BASE_HASCHILD="0" - if [ -d "${bastille_jailsdir}" ]; then + if [ -d "${bastille_jailsdir}" ]; then JAIL_LIST=$(ls "${bastille_jailsdir}" | sed "s/\n//g") for _jail in ${JAIL_LIST}; do if grep -qwo "${NAME}" ${bastille_jailsdir}/${_jail}/fstab 2>/dev/null; then diff --git a/usr/local/share/bastille/list.sh b/usr/local/share/bastille/list.sh index f8b0944a..33f493f3 100644 --- a/usr/local/share/bastille/list.sh +++ b/usr/local/share/bastille/list.sh @@ -51,8 +51,7 @@ if [ $# -gt 0 ]; then REL_LIST=$(ls "${bastille_releasesdir}" | sed "s/\n//g") for _REL in ${REL_LIST}; do if [ -f "${bastille_releasesdir}/${_REL}/root/.profile" ]; then - #echo "${bastille_releasesdir}/${_REL}" - echo "${_REL}" + echo "${_REL}" fi done fi diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index 76edaba3..a1c2e044 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -106,8 +106,8 @@ for _jail in ${JAILS}; do ;; *) echo -e "${COLOR_RED}Template INCLUDE content not recognized.${COLOR_RESET}" - exit 1 - ;; + exit 1 + ;; esac echo diff --git a/usr/local/share/bastille/verify.sh b/usr/local/share/bastille/verify.sh index cbb72617..d33528a9 100644 --- a/usr/local/share/bastille/verify.sh +++ b/usr/local/share/bastille/verify.sh @@ -88,8 +88,8 @@ verify_template() { ;; *) echo -e "${COLOR_RED}Template INCLUDE content not recognized.${COLOR_RESET}" - exit 1 - ;; + exit 1 + ;; esac done < ${_path}