Skip to content

Commit

Permalink
Fix for #204
Browse files Browse the repository at this point in the history
zrep_changeconfig was not adjusting for -d
  • Loading branch information
ppbrown committed Mar 31, 2024
1 parent 7bcbf28 commit 8230cc3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions zrep
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,8 @@ clearquit(){
# Usage:
# setfsconfigs srcfs desthost destfs
# setfsconfigs -d destfs srchost srcfs
#
# (-d indicates we are running on the desthost)
#
setfsconfigs(){
typeset srchost srcfs desthost destfs fsname

Expand Down Expand Up @@ -1501,7 +1502,13 @@ zrep_changeconfig(){
setfsconfigs $@
return
fi
typeset srcfs="$1" check

typeset srcfs check
if [[ "$1" == "-d" ]] ; then
srcfs="$2"
else
srcfs="$1"
fi

if [[ "$srcfs" == "" ]] ; then
zrep_errquit "zrep: no fs specified"
Expand Down
11 changes: 9 additions & 2 deletions zrep_snap
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ clearquit(){
# Usage:
# setfsconfigs srcfs desthost destfs
# setfsconfigs -d destfs srchost srcfs
#
# (-d indicates we are running on the desthost)
#
setfsconfigs(){
typeset srchost srcfs desthost destfs fsname

Expand Down Expand Up @@ -601,7 +602,13 @@ zrep_changeconfig(){
setfsconfigs $@
return
fi
typeset srcfs="$1" check

typeset srcfs check
if [[ "$1" == "-d" ]] ; then
srcfs="$2"
else
srcfs="$1"
fi

if [[ "$srcfs" == "" ]] ; then
zrep_errquit "zrep: no fs specified"
Expand Down

0 comments on commit 8230cc3

Please sign in to comment.