mountall.sh 869 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: mountall
  4. # Required-Start: mountvirtfs
  5. # Required-Stop:
  6. # Default-Start: S
  7. # Default-Stop:
  8. # Short-Description: Mount all filesystems.
  9. # Description:
  10. ### END INIT INFO
  11. . /etc/default/rcS
  12. #
  13. # Mount local filesystems in /etc/fstab. For some reason, people
  14. # might want to mount "proc" several times, and mount -v complains
  15. # about this. So we mount "proc" filesystems without -v.
  16. #
  17. test "$VERBOSE" != no && echo "Mounting local filesystems..."
  18. mount -at nonfs,nosmbfs,noncpfs 2>/dev/null
  19. #
  20. # We might have mounted something over /dev, see if /dev/initctl is there.
  21. #
  22. if test ! -p /dev/initctl
  23. then
  24. rm -f /dev/initctl
  25. mknod -m 600 /dev/initctl p
  26. fi
  27. kill -USR1 1
  28. #
  29. # Execute swapon command again, in case we want to swap to
  30. # a file on a now mounted filesystem.
  31. #
  32. [ -x /sbin/swapon ] && swapon -a
  33. : exit 0