mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-03 19:23:42 +01:00
rework blank lines again
This commit is contained in:
@@ -98,9 +98,6 @@ for _jail in ${JAILS}; do
|
||||
error_continue "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
COUNT=$(($COUNT+1))
|
||||
|
||||
@@ -67,7 +67,6 @@ fi
|
||||
# Notify message on error, and continue to next jail
|
||||
error_continue() {
|
||||
error_notify "$@"
|
||||
echo ""
|
||||
# shellcheck disable=SC2104
|
||||
continue
|
||||
}
|
||||
@@ -209,10 +208,8 @@ set_target() {
|
||||
TARGET="$(list_jail_priority "${TARGET}" | sort -k2 -nr | awk '{print $1}')"
|
||||
JAILS="$(list_jail_priority "${TARGET}" | sort -k2 -nr | awk '{print $1}')"
|
||||
fi
|
||||
_FIRST_JAIL="$(echo ${JAILS} | awk '{print $1}')"
|
||||
export TARGET
|
||||
export JAILS
|
||||
export _FIRST_JAIL
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -239,10 +236,8 @@ set_target_single() {
|
||||
fi
|
||||
TARGET="${_TARGET}"
|
||||
JAILS="${_TARGET}"
|
||||
_FIRST_JAIL="$(echo ${JAILS} | awk '{print $1}')"
|
||||
export TARGET
|
||||
export JAILS
|
||||
export _FIRST_JAIL
|
||||
}
|
||||
|
||||
target_all_jails() {
|
||||
@@ -258,9 +253,7 @@ target_all_jails() {
|
||||
elif [ "${_order}" = "reverse" ]; then
|
||||
JAILS="$(list_jail_priority "${JAILS}" | sort -k2 -nr | awk '{print $1}')"
|
||||
fi
|
||||
_FIRST_JAIL="$(echo ${JAILS} | awk '{print $1}')"
|
||||
export JAILS
|
||||
export _FIRST_JAIL
|
||||
}
|
||||
|
||||
update_fstab() {
|
||||
|
||||
@@ -123,9 +123,6 @@ for _jail in ${JAILS}; do
|
||||
error_continue "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
LOGIN="$(jexec -l "${_jail}" which login)"
|
||||
|
||||
@@ -88,9 +88,6 @@ set_target "${TARGET}"
|
||||
|
||||
for _jail in ${JAILS}; do
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
host_path="${HOST_PATH}"
|
||||
|
||||
@@ -52,9 +52,6 @@ destroy_jail() {
|
||||
|
||||
for _jail in ${JAILS}; do
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
bastille_jail_base="${bastille_jailsdir}/${_jail}"
|
||||
bastille_jail_log="${bastille_logsdir}/${_jail}_console.log"
|
||||
|
||||
|
||||
@@ -94,9 +94,6 @@ for _jail in ${DEST_TARGET}; do
|
||||
continue
|
||||
else
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
source_path="$(echo ${bastille_jailsdir}/${SOURCE_TARGET}/root/${SOURCE_PATH} | sed 's#//#/#g')"
|
||||
|
||||
@@ -109,9 +109,6 @@ for _jail in ${JAILS}; do
|
||||
error_notify "Jail is not running."
|
||||
error_continue "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
|
||||
@@ -150,9 +150,6 @@ for _jail in ${JAILS}; do
|
||||
error_exit "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
_fullpath_fstab="$( echo "${bastille_jailsdir}/${_jail}/root/${_jailpath_fstab}" 2>/dev/null | sed 's#//#/#' )"
|
||||
|
||||
@@ -104,9 +104,6 @@ for _jail in ${JAILS}; do
|
||||
error_continue "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
bastille_jail_path="${bastille_jailsdir}/${_jail}/root"
|
||||
|
||||
@@ -95,9 +95,6 @@ for _jail in ${JAILS}; do
|
||||
error_continue "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
jexec -l "${_jail}" /usr/sbin/service "$@"
|
||||
|
||||
@@ -110,9 +110,6 @@ for _jail in ${JAILS}; do
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
|
||||
@@ -86,9 +86,6 @@ set_target "${TARGET}" "reverse"
|
||||
|
||||
for _jail in ${JAILS}; do
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
check_target_is_running "${_jail}" || error_continue "Jail is already stopped."
|
||||
|
||||
@@ -94,9 +94,6 @@ for _jail in ${JAILS}; do
|
||||
error_notify "Jail is not running."
|
||||
error_continue "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
|
||||
@@ -76,9 +76,6 @@ set_target "${TARGET}"
|
||||
|
||||
for _jail in ${JAILS}; do
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
bastille_jail_tags="${bastille_jailsdir}/${_jail}/tags"
|
||||
case ${ACTION} in
|
||||
add)
|
||||
|
||||
@@ -277,9 +277,6 @@ for _jail in ${JAILS}; do
|
||||
error_notify "Jail is not running."
|
||||
error_continue "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
|
||||
@@ -95,9 +95,6 @@ for _jail in ${JAILS}; do
|
||||
error_exit "Use [-a|--auto] to auto-start the jail."
|
||||
fi
|
||||
|
||||
# Print blank line in front of first jail
|
||||
[ "${_jail}" = "${_FIRST_JAIL}" ] && echo ""
|
||||
|
||||
info "[${_jail}]:"
|
||||
|
||||
_jailpath="$( echo "${bastille_jailsdir}/${_jail}/root/${MOUNT_PATH}" 2>/dev/null | sed 's#//#/#' | sed 's#\\##g')"
|
||||
|
||||
Reference in New Issue
Block a user