mountkernfs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/sh
  2. # Begin /etc/init.d/mountkernfs
  3. ### BEGIN INIT INFO
  4. # Provides: mountkernfs
  5. # Required-Start:
  6. # Should-Start:
  7. # Required-Stop:
  8. # Should-Stop:
  9. # Default-Start: S
  10. # Default-Stop:
  11. # Short-Description: Mounts /sys and /proc virtual (kernel) filesystems.
  12. # Description: Mounts /sys and /proc virtual (kernel) filesystems.
  13. # X-LFS-Default-Start: S00
  14. # X-LFS-Default-Stop:
  15. # X-LFS-Provided-By: LFS
  16. ### END INIT INFO
  17. . /lib/lsb/init-functions
  18. case "${1}" in
  19. start)
  20. message="Mounting kernel-based file systems:"
  21. if ! mountpoint /proc > /dev/null; then
  22. message="${message}${INFO} /proc${NORMAL}"
  23. mount -n /proc || failed=1
  24. fi
  25. if ! mountpoint /sys > /dev/null; then
  26. message="${message}${INFO} /sys${NORMAL}"
  27. mount -n /sys || failed=1
  28. fi
  29. (exit ${failed})
  30. evaluate_retval standard
  31. ;;
  32. *)
  33. echo "Usage: ${0} {start}"
  34. exit 1
  35. ;;
  36. esac
  37. # End /etc/init.d/mountkernfs