mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-24 03:01:01 +01:00
Minor code cleanup/formatting
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -88,8 +88,8 @@ verify_template() {
|
||||
;;
|
||||
*)
|
||||
echo -e "${COLOR_RED}Template INCLUDE content not recognized.${COLOR_RESET}"
|
||||
exit 1
|
||||
;;
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done < ${_path}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user