diff --git a/usr/local/share/bastille/cp.sh b/usr/local/share/bastille/cp.sh index ad2faaa2..83dbf0b8 100644 --- a/usr/local/share/bastille/cp.sh +++ b/usr/local/share/bastille/cp.sh @@ -61,11 +61,13 @@ fi for _jail in ${JAILS}; do bastille_jail_path="$(jls -j "${_jail}" path)" echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}" - # Add line break and return status - if cp -av "${CPSOURCE}" "${bastille_jail_path}/${CPDEST}"; then - echo + cp -av "${CPSOURCE}" "${bastille_jail_path}/${CPDEST}" + RETURN="$?" + if [ "${TARGET}" = "ALL" ]; then + # Display the return status for reference + echo -e "Returned: ${RETURN}\n" else echo - false + return "${RETURN}" fi done