/share/examples/nwclient/nwfs.sh.sample

https://bitbucket.org/freebsd/freebsd-head/ · Shell · 34 lines · 21 code · 3 blank · 10 comment · 3 complexity · db18f16d8ee22b6f672bf93d3788eba3 MD5 · raw file

  1. #!/bin/sh
  2. #
  3. # $FreeBSD$
  4. #
  5. # Location: /usr/local/etc/rc.d/nwfs.sh
  6. #
  7. # Simple script to mount NetWare volumes at startup.
  8. # It assumes that all mount points described in fstab file and password
  9. # entries listed in /root/.nwfsrc file. See mount_nwfs(8) for details.
  10. #
  11. mount=/sbin/mount
  12. umount=/sbin/umount
  13. HOME=/root; export HOME
  14. vols="/nw/sys /nw/vol1"
  15. if [ "x$1" = "x" -o "x$1" = "xstart" ]; then
  16. echo -n "Mounting NetWare volumes: "
  17. for vol in ${vols}; do
  18. $mount $vol
  19. echo -n "$vol "
  20. done
  21. echo "Done"
  22. elif [ "x$1" = "xstop" ]; then
  23. echo -n "Unmounting NetWare mount points: "
  24. for vol in ${vols}; do
  25. $umount $vol
  26. echo -n "$vol "
  27. done
  28. echo "Done"
  29. else
  30. echo "Unknown command $1"
  31. fi