Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions zrep
Original file line number Diff line number Diff line change
Expand Up @@ -228,22 +228,6 @@ else
Z_LOCAL_HOST=${Z_LOCAL_HOST%%.*}
fi


# Slightly ugly to implement this as a global flag. But... it makes
# a lot of things simpler, like "ssh zrep xyhz" for multiple things.
if [[ "$1" == "-R" ]] ; then
ZREP_R="-R"
shift
fi

if [[ "$ZREP_R" == "-R" ]] ; then
# ZREP_R is a user-settable env var. It also gets used in
# "zfs send" commandlines. However.. we also need to call
# "zfs snap".. which requires LOWERCASE R. So this is an automatically set
# mirror of that.
Z_SNAP_R="-r"
fi

if [[ "$MBUFFER" != "" ]] ; then
_errprint WARNING: MBUFER variable deprecated in zrep
_errprint WARNING: use ZREP_OUTFILTER and ZREP_INFILTER instead
Expand Down Expand Up @@ -2677,7 +2661,7 @@ usage(){
#
# Special global flags that must always be processed FIRST, before normal command args.
#
while [[ "$1" == -[tD] ]] ; do
while [[ "$1" == -[tDR] ]] ; do
case "$1" in
-D)
DEBUG=1
Expand All @@ -2692,8 +2676,12 @@ while [[ "$1" == -[tD] ]] ; do
shift
shift
;;
-R)
ZREP_R="-R"
shift
;;
esac
done
done


if [[ "$ZREPTAG" != "zrep" ]] ; then
Expand All @@ -2708,6 +2696,13 @@ fi
# ensure it is set to SOMETHING by default. Default is to send all
ZREP_INC_FLAG=${ZREP_INC_FLAG:-"-I"}

if [[ "$ZREP_R" == "-R" ]] ; then
# ZREP_R is a user-settable env var. It also gets used in
# "zfs send" commandlines. However.. we also need to call
# "zfs snap".. which requires LOWERCASE R. So this is an automatically set
# mirror of that.
Z_SNAP_R="-r"
fi



Expand Down
15 changes: 13 additions & 2 deletions zrep_top
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ usage(){
#
# Special global flags that must always be processed FIRST, before normal command args.
#
while [[ "$1" == -[tD] ]] ; do
while [[ "$1" == -[tDR] ]] ; do
case "$1" in
-D)
DEBUG=1
Expand All @@ -81,8 +81,12 @@ while [[ "$1" == -[tD] ]] ; do
shift
shift
;;
-R)
ZREP_R="-R"
shift
;;
esac
done
done


if [[ "$ZREPTAG" != "zrep" ]] ; then
Expand All @@ -97,6 +101,13 @@ fi
# ensure it is set to SOMETHING by default. Default is to send all
ZREP_INC_FLAG=${ZREP_INC_FLAG:-"-I"}

if [[ "$ZREP_R" == "-R" ]] ; then
# ZREP_R is a user-settable env var. It also gets used in
# "zfs send" commandlines. However.. we also need to call
# "zfs snap".. which requires LOWERCASE R. So this is an automatically set
# mirror of that.
Z_SNAP_R="-r"
fi



Expand Down
16 changes: 0 additions & 16 deletions zrep_vars
Original file line number Diff line number Diff line change
Expand Up @@ -218,22 +218,6 @@ else
Z_LOCAL_HOST=${Z_LOCAL_HOST%%.*}
fi


# Slightly ugly to implement this as a global flag. But... it makes
# a lot of things simpler, like "ssh zrep xyhz" for multiple things.
if [[ "$1" == "-R" ]] ; then
ZREP_R="-R"
shift
fi

if [[ "$ZREP_R" == "-R" ]] ; then
# ZREP_R is a user-settable env var. It also gets used in
# "zfs send" commandlines. However.. we also need to call
# "zfs snap".. which requires LOWERCASE R. So this is an automatically set
# mirror of that.
Z_SNAP_R="-r"
fi

if [[ "$MBUFFER" != "" ]] ; then
_errprint WARNING: MBUFER variable deprecated in zrep
_errprint WARNING: use ZREP_OUTFILTER and ZREP_INFILTER instead
Expand Down