Commit 3aa362fa authored by Robert Spencer's avatar Robert Spencer

Add an option to only do a specific lv

parent c1ba4e20
......@@ -31,7 +31,17 @@ esac
# Parse options
OPTIND=1
getopts ":v" OPTION
while getopts ":o:v" OPTION
do
case "$OPTION" in
o)
ONLY="$OPTARG"
;;
v)
VERBOSE="true"
;;
esac
done
# Remove option from parameters
shift $(expr $OPTIND - 1)
......@@ -49,7 +59,7 @@ else
fi
# Change sync options for when we are debugging
if [ "$OPTION" = "v" ]
if [ "$VERBOSE" = "true" ]
then
syncopts="--debug --max-load=$DEBUG_MAX_LOAD"
set -ex
......@@ -60,6 +70,11 @@ fi
# Loop with all LVS
for LV in "${BACKUP_LVS[@]}"
do
if [ -n "$ONLY" ] && [ "$ONLY" != "$LV" ]
then
continue
fi
OLD_IFS="$IFS"
IFS=','
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment