Permalink
Browse files

Use fifo instead of dpipe

Using native fifo (mkfifo) removes the need for dpipe, an external
dependency.
  • Loading branch information...
rom1v committed Jun 16, 2014
1 parent 83d3dea commit 440a3577a41eed0ed8fdd136e85e5a18daea76a6
Showing with 6 additions and 6 deletions.
  1. +0 −4 README.md
  2. +6 −2 rsshfs
@@ -5,10 +5,6 @@ See <http://blog.rom1v.com/2014/06/sshfs-inverse-rsshfs/>.

## Dependencies

On the local host:

* `vde2` (for `dpipe`)

On the remote host:

* `sshfs`
8 rsshfs
@@ -35,6 +35,10 @@ else
qall=$(quote "$@")

printf "Mounting '$lpath' on '$rhost:$rpath'...\n"
dpipe /usr/lib/openssh/sftp-server = \
ssh "$rhost" sshfs -o slave ":$qlpath" "$qrpath" "$qall"
fifo=/tmp/rsshfs-$$
rm -f "$fifo"
mkfifo -m600 "$fifo" &&
< "$fifo" /usr/lib/openssh/sftp-server |
ssh "$rhost" sshfs -o slave ":$qlpath" "$qrpath" "$qall" > "$fifo"
rm "$fifo"
fi

0 comments on commit 440a357

Please sign in to comment.