vars.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Set rcS vars
  3. #
  4. # Because /etc/default/rcS isn't a conffile, it's never updated
  5. # automatically. So that an empty or outdated file missing newer
  6. # options works correctly, set the default values here.
  7. TMPTIME=0
  8. SULOGIN=no
  9. DELAYLOGIN=no
  10. UTC=yes
  11. VERBOSE=no
  12. FSCKFIX=no
  13. # Source conffile
  14. if [ -f /etc/default/rcS ]; then
  15. . /etc/default/rcS
  16. fi
  17. # Unset old unused options
  18. unset EDITMOTD
  19. unset RAMRUN
  20. unset RAMLOCK
  21. # Don't unset RAMSHM and RAMTMP for now.
  22. # Parse kernel command line
  23. if [ -r /proc/cmdline ]; then
  24. for ARG in $(cat /proc/cmdline); do
  25. case $ARG in
  26. # check for bootoption 'noswap' and do not activate swap
  27. # partitions/files when it is set.
  28. noswap)
  29. NOSWAP=yes
  30. ;;
  31. # Accept the same 'quiet' option as the kernel, but only
  32. # during boot and shutdown. Only use this rule when the
  33. # variables set by init.d/rc is present.
  34. quiet)
  35. if [ "$RUNLEVEL" ] && [ "$PREVLEVEL" ] ; then
  36. VERBOSE="no"
  37. fi
  38. ;;
  39. esac
  40. done
  41. fi
  42. # But allow both rcS and the kernel options 'quiet' to be overrided
  43. # when INIT_VERBOSE=yes is used as well.
  44. if [ "$INIT_VERBOSE" ] ; then
  45. VERBOSE="$INIT_VERBOSE"
  46. fi