7 # Symlink from /usr/local/etc/rc.d/afsd to /usr/vice/etc/afs.rc.fbsd
8 # and add the following lines to /etc/rc.conf.local or /etc/rc.conf
9 # to enable this service:
11 # afsd_enable (bool): Set to NO by default.
12 # Set it to YES to enable afsd.
14 # Suggested values for a "large" configuration:
15 # afsd_flags="-stat 2800 -daemons 5 -volumes 128"
17 # Suggested values for a "medium" configuration:
18 # afsd_flags="-stat 2000 -daemons 3 -volumes 70"
20 # Suggested values for a "small" configuration:
21 # afsd_flags="-stat 300 -daemons 2 -volumes 50"
28 command="/usr/vice/etc/afsd"
29 command_args
="-dynroot -fakestat-all -afsdb -memcache"
31 start_precmd
="afsd_prestart"
32 start_postcmd
="afsd_poststart"
36 vicedir
="/usr/vice/etc"
37 required_modules
="libafs:afs"
38 required_files
="${vicedir}/cacheinfo ${vicedir}/ThisCell ${vicedir}/CellServDB"
40 load_rc_config
"$name"
42 : ${afsd_enable:="NO"}
43 : ${afsd_flags:="-stat 2800 -daemons 6 -volumes 128"}
49 # need a mountpoint and a cache dir (well, if we have a disk cache)
50 # Should use required_dirs, but no good way to extract from cacheinfo
51 for dir
in $
(awk -F: '{print $1, $2}' ${vicedir}/cacheinfo
); do
52 if [ ! -d "${dir}" ]; then
53 err
1 "Directory ${dir} does not exist. Not starting AFS client."
60 /usr
/local
/bin
/fs setcrypt
-crypt on
67 afsdir
=$
(awk -F: '{print $1}' ${vicedir}/cacheinfo
)
68 if ! umount
$afsdir; then
69 [ -n "${rc_force}" ] && umount
-f ${afsdir}