1
0

rc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Begin /etc/default/rc
  2. # Author: DJ Lucas - dj@linuxfromscratch.org
  3. # Version: 1.0 LSB V.3.1
  4. # Global variable inherited by initscripts are in caps
  5. # Local variables for the rc script are in lowercase
  6. # Source site specific rc configuration
  7. . /etc/default/rc.site
  8. # This sets default terminal options.
  9. # stty sane - this has been removed as nobody recalls
  10. # the reason for it in the first place - if no problems arize,
  11. # then it will be removed completely at a later date.
  12. # Setup default values for the environment
  13. umask 022
  14. PATH="/bin:/sbin"
  15. # Find current screen size
  16. if [ -z "${COLUMNS}" ]; then
  17. COLUMNS=$(stty size)
  18. COLUMNS=${COLUMNS##* }
  19. fi
  20. # When using remote connections, such as a serial port, stty size returns 0
  21. if [ "${COLUMNS}" = "0" ]; then
  22. COLUMNS=80
  23. fi
  24. ## Measurements for positioning result messages
  25. COL=$((${COLUMNS} - 8))
  26. WCOL=$((${COL} - 2))
  27. # Set Cursur Position Commands, used via echo -e
  28. SET_COL="\\033[${COL}G" # at the $COL char
  29. SET_WCOL="\\033[${WCOL}G" # at the $WCOL char
  30. CURS_UP="\\033[1A\\033[0G" # Up one line, at the 0'th char
  31. # Export the environment variables so they are inherited by the scripts
  32. export PATH SET_COL SET_WCOL CURS_UP BOOTLOG_ENAB
  33. # End /etc/default/rc