new
This commit is contained in:
parent
e961291897
commit
b8c9f31785
6 changed files with 60 additions and 32 deletions
21
src/cmd/netfiles/netfilelib.rc
Normal file
21
src/cmd/netfiles/netfilelib.rc
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
ns=`{namespace}
|
||||
if(</dev/null dial 'unix!'^$ns/$1 >[2]/dev/null)
|
||||
f=$f^9p
|
||||
|
||||
fn mysftp {
|
||||
if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){
|
||||
echo 'caching sftp' $1 >[1=2]
|
||||
sftpcache -D $1
|
||||
}
|
||||
if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){
|
||||
sftp -b /dev/stdin $1
|
||||
}
|
||||
if not{
|
||||
{cat; echo DONE} | dial -e 'unix!'^$ns/$1.sftp
|
||||
}
|
||||
}
|
||||
|
||||
t=/tmp/netfilexxx.$pid.$USER
|
||||
fn sigexit { rm -f $t $t.e $t.e2 }
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue