Fix for silently ignore arguments after mode broke exec mode
parent
ffc37069f9
commit
5fd3dce8c1
|
|
@ -222,7 +222,7 @@ done
|
||||||
|
|
||||||
# Interpret all remaining arguments as mode parameters
|
# Interpret all remaining arguments as mode parameters
|
||||||
shift "$((OPTIND - 1))"
|
shift "$((OPTIND - 1))"
|
||||||
MODE="${@}"
|
MODE="${1}"
|
||||||
|
|
||||||
|
|
||||||
echo "Loading config from ${CONFIG}"
|
echo "Loading config from ${CONFIG}"
|
||||||
|
|
@ -243,6 +243,11 @@ mkdir -p "${LOCKDIR}"
|
||||||
# Enforce bandwidth limit if set
|
# Enforce bandwidth limit if set
|
||||||
[[ -n ${BWLIMIT} ]] && [[ ${BWLIMIT} != "0" ]] && limit_bw
|
[[ -n ${BWLIMIT} ]] && [[ ${BWLIMIT} != "0" ]] && limit_bw
|
||||||
|
|
||||||
|
if [[ ${MODE} != "exec" ]] && [[ $# -gt 1 ]]; then
|
||||||
|
print_usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${MODE} == "init" ]]; then
|
if [[ ${MODE} == "init" ]]; then
|
||||||
borg_init
|
borg_init
|
||||||
elif [[ ${MODE} == "backup" ]]; then
|
elif [[ ${MODE} == "backup" ]]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue