1
0

mountkernfs 841 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin $rc_base/init.d/mountkernfs
  4. #
  5. # Description : Mount proc and sysfs
  6. #
  7. # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
  8. #
  9. # Version : 00.00
  10. #
  11. # Notes :
  12. #
  13. ########################################################################
  14. . /etc/sysconfig/rc
  15. . ${rc_functions}
  16. case "${1}" in
  17. start)
  18. boot_mesg -n "Mounting kernel-based file systems:" ${INFO}
  19. if ! mountpoint /proc >/dev/null; then
  20. boot_mesg -n " /proc" ${NORMAL}
  21. mount -n /proc || failed=1
  22. fi
  23. if ! mountpoint /sys >/dev/null; then
  24. boot_mesg -n " /sys" ${NORMAL}
  25. mount -n /sys || failed=1
  26. fi
  27. boot_mesg "" ${NORMAL}
  28. (exit ${failed})
  29. evaluate_retval
  30. ;;
  31. *)
  32. echo "Usage: ${0} {start}"
  33. exit 1
  34. ;;
  35. esac
  36. # End $rc_base/init.d/mountkernfs