wok-current rev 16756
sshfs-fuse: add rsshfs
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jun 16 19:07:54 2014 +0200 (2014-06-16) |
parents | facb8d1d8c91 |
children | 434e78d6fa7a |
files | sshfs-fuse/receipt sshfs-fuse/stuff/rsshfs |
line diff
1.1 --- a/sshfs-fuse/receipt Mon Jun 16 11:29:33 2014 +0200 1.2 +++ b/sshfs-fuse/receipt Mon Jun 16 19:07:54 2014 +0200 1.3 @@ -29,4 +29,5 @@ 1.4 { 1.5 mkdir -p $fs/usr 1.6 cp -a $install/usr/bin $fs/usr 1.7 + cp -a $stuff/rsshfs $fs/usr/bin 1.8 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/sshfs-fuse/stuff/rsshfs Mon Jun 16 19:07:54 2014 +0200 2.3 @@ -0,0 +1,25 @@ 2.4 +#!/bin/sh 2.5 +# from https://github.com/rom1v/rsshfs/blob/master/rsshfs 2.6 + 2.7 +rhost="${2%:*}" 2.8 +rpath="${2#*:}" 2.9 +lpath="$1" 2.10 + 2.11 +case "$2" in 2.12 +-u) ssh "$rhost" fusermount -u "$rpath" 2.13 + ;; 2.14 + 2.15 +''|-*) cat <<EOT 2.16 +usage: 2.17 + $0 localpath remotehost:remotepath [-o ro -o allow_other] 2.18 + $0 -u remotehost:remotepath 2.19 +EOT 2.20 + ;; 2.21 + 2.22 +*) fifo=/tmp/rsshfs-fifo$$ 2.23 + shift 2 2.24 + mkfifo $fifo 2.25 + /usr/sbin/sftp-server < $fifo | \ 2.26 + ssh "$rhost" sshfs -o slave ":$lpath" "$rpath" "$@" > $fifo 2.27 + rm -f $fifo 2.28 +esac