Plan 9 from Bell Labs’s /usr/web/sources/contrib/yk/lab/unix/fs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/sh
#
# To publish: cp $% /n/sources/contrib/yk/lab/unix/

pickexists(){ for i; do test -e $i && echo $i && return; done }

fs=${1?}
mnt=${2-`{ pickexists /n/$fs /n/remote; }`}	# see synthetic.conf(5) and /usr/share/firmlinks

printf 'fs… '
umount -f $mnt 2>/dev/null || true
diskutil unmount force $mnt  2>/dev/null || true
umask 0222  # for 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 \
	&&
echo $mnt

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.