Extra sanity checks around usmb
This commit is contained in:
parent
b6786c25b1
commit
61dda9b5c3
8
bare.sh
8
bare.sh
|
@ -233,6 +233,14 @@ for f in $REPOSTOBACKUP; do
|
||||||
DATAPATH=$(getdatapath $f)
|
DATAPATH=$(getdatapath $f)
|
||||||
checktag "$f" usmb
|
checktag "$f" usmb
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
|
if [[ -z $USMB_PREFIX ]]; then
|
||||||
|
log "Error: repo '$REPO' has usmb tag but \$USB_PREFIX not defined."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! [[ $DATAPATH == *${USMB_PREFIX}* ]]; then
|
||||||
|
log "Error: path '$DATAPATH' of repo '$REPO' does not contain '$USMB_PREFIX'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
USMBNAME=`echo "${DATAPATH}" | sed -e "s,${USMB_PREFIX}/\(.*\)/.*,\1,"`
|
USMBNAME=`echo "${DATAPATH}" | sed -e "s,${USMB_PREFIX}/\(.*\)/.*,\1,"`
|
||||||
USEUSMB=1
|
USEUSMB=1
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue