MFS - Fix mmap issues with files under MFS
[dragonfly.git] / contrib / smbfs / examples / smbfs.sh.sample
blob7908de26cc6424e1f1afbb238a7281b39bd195a5
1 #!/bin/sh
3 # $Id: smbfs.sh.sample,v 1.3 2001/01/13 04:50:36 bp Exp $
5 # Location: /usr/local/etc/rc.d/smbfs.sh
7 # Simple script to mount smbfs file systems at startup.
8 # It assumes that all mount points described in fstab file and password
9 # entries listed in /root/.nsmbrc file. See mount_smbfs(8) for details.
12 mount="/sbin/mount -o -N"
13 umount=/sbin/umount
14 HOME=/root; export HOME
15 vols=`awk -- '/^\/.*[[:space:]]+smbfs[[:space:]]+/ { print $2 }' /etc/fstab`
17 case "$1" in
18 start)
19 echo -n "smbfs: "
20 for vol in ${vols}; do
21 $mount $vol
22 echo -n "$vol "
23 done
25 stop)
26 echo -n "unmounting smbfs mount points: "
27 for vol in ${vols}; do
28 $umount $vol
29 echo -n "$vol "
30 done
33 echo "Usage: `basename $0` {start|stop}" >&2
34 exit 64
35 esac
37 echo "Done"