Example invocation using sshfs:
`afuse -o mount_template="sshfs %r:/ %m" \
-o unmount_template="fusermount -u -z %m" \
mountpoint/`
Now try ls mountpoint/user@host/
.
afuse -o mount_template="sshfs -o allow_other -o idmap=user %r:/ %m" -o unmount_template="fusermount -u -z %m" ~/sshfs/
afuse -o mount_template="curlftpfs -o allow_other ftp://%r %m" -o unmount_template="fusermount -u -z %m" /ftpfs/
afuse -o mount_template="wdfs http://%r %m -o allow_other -o username=user -o password=password" -o unmount_template="fusermount -u -z %m" /davfs/
Bsp: Automount drFTPd Site & prepopulate dir's
Example: ls /mnt/iNCOMiNG
Preq: Write your "mount script"
-
~/lftp/site-incomming
set ftp:fxp-force no set ftp:fxp-passive-source true set ftp:use-fxp false set ssl:check-hostname no set ssl:verify-certificate no open ftp://USERNAME:[email protected]:10900/
-
Get your preprolutatet dir list like
echo | lftp -e 'cd iNCOMiNG/;nlist' site-yours > ~/lftp/cat-incoming
-
Create cache dir's
mkdir /mnt/cache && cd !$ cat ~/lftp/cat-incoming | xargs mkdir
-
Now the afuse magic:
afuse -o populate_root_command="echo | cat ~/lftp/cat-incoming" \ -o mount_template="lftpfs --options=allow_other --no-cache=true %m /mnt/cache/%r \ ~/lftp/site-incomming /iNCOMiNG/%r" -o unmount_template="fusermount -u -z %m" /mnt/iNCOMiNG/%r
Example invocation using sshfs:
`afuse -o mount_template="sshfs %r:/ %m" \
-o unmount_template="fusermount -u -z %m" \
mountpoint/`
Now try ls mountpoint/user@host/
.