rc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Begin /etc/sysconfig/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/sysconfig/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. # Bootlogging and interactive startup require a valid tempfs mount
  32. # if this mount is not present, disable them
  33. if [ "${TEMPFS_MOUNT}" = "" -o ! -d "${TEMPFS_MOUNT}" ]; then
  34. TEMPFS_MOUNT=""
  35. iprompt=""
  36. BOOTLOG_ENAB=""
  37. fi
  38. # Export the environment variables so they are inherited by the scripts
  39. export PATH SET_COL SET_WCOL CURS_UP TEMPFS_MOUNT BOOTLOG_ENAB RUNLEVEL
  40. # End /etc/sysconfig/rc