#!/bin/sh
#
# To publish: cp $% /n/sources/contrib/yk/lab/unix/
fs=${1?}
mnt=${2-/n/`{ echo $fs | sed 's/.*@//'; }`} # see synthetic.conf(5) and /usr/share/firmlinks
umount -f $mnt 2>/dev/null || true
diskutil unmount force $mnt 2>/dev/null || true
umask 0222 # for the implied mkdir $mnt
sshfs \
-o modules=subdir -o subdir=/ -o rellinks \
-o disable_hardlink \
-o no_check_root \
-o no_readahead \
-o sshfs_sync \
-o auto_cache \
-o cache_dir_timeout=4 \
-o ServerAliveInterval=15 \
$fs:/ $mnt
|