Open hxw opened 3 years ago
It is actually not hard coded:
LZFS=$( which zfs )
RZFS=$LZFS
Just make sure your PATH prefers /usr/local/sbin before /sbin and it should "do the right thing"
For the local side:
% command -v zfs
/sbin/zfs
For remote side:
freenas:~ # command -v zfs
/usr/local/sbin/zfs
/sbin/zfs is hard coded for -O and -T options:
https://github.com/allanjude/zxfer/blob/1cc89cc681e1351a9b4e8750d9e078b66485910b/zxfer#L1943 https://github.com/allanjude/zxfer/blob/1cc89cc681e1351a9b4e8750d9e078b66485910b/zxfer#L1962
I am using -T so I think the second line is the problem. I expect a separate ssh command -v zfs
is necessary to get the remote path.
It just occurred to me that the PATH will be setup on the remote so ssh $OPTARG zfs
should always work, so no need to hard code the /sbin path in the ssh commands.
/sbin/zfs
is hard coded on the ssh lines/usr/local/sbin/zfs