rc.site 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Set base directory information
  2. RC_BASE="/etc"
  3. RC_FUNCTIONS="${RC_BASE}/init.d/lfs-functions"
  4. # Location of network device scripts and config files
  5. NETWORK_DEVICES="/etc/sysconfig/network-devices"
  6. # Directory to store boot process accounting information
  7. # Used for boot logging and interactive flag when rootfs
  8. # is not writable
  9. TEMPFS_MOUNT="${RC_BASE}/init.d/boottemp"
  10. # Bootlogging (requires a tempfs mount)
  11. BOOTLOG_ENAB="yes"
  12. # Distro Information
  13. DISTRO="Linux From Scratch" # The distro name
  14. DISTRO_CONTACT="lfs-dev@linuxfromscratch.org" # Bug report address
  15. DISTRO_MINI="lfs" # Short name used in filenames for distro config
  16. # Define custom colors used in messages printed to the screen
  17. BRACKET="\\033[1;34m" # Blue
  18. FAILURE="\\033[1;31m" # Red
  19. INFO="\\033[1;36m" # Cyan
  20. NORMAL="\\033[0;39m" # Grey
  21. SUCCESS="\\033[1;32m" # Green
  22. WARNING="\\033[1;33m" # Yellow
  23. # Prefix boot messages for easier reading on framebuffer consoles
  24. PREFIX_SUCCESS=" ${SUCCESS}*${NORMAL} "
  25. PREFIX_WARNING="${WARNING}**${NORMAL} "
  26. PREFIX_FAILURE="${FAILURE}***${NORMAL}"
  27. # Export varialbles so that they are inherited by the initscripts
  28. export RC_BASE RC_FUNCTIONS NETWORK_DEVICES TEMPFS_MOUNT BOOTLOG_ENAB
  29. export DISTRO DISTRO_CONTACT DISTRO_MINI
  30. export BRACKET FAILURE INFO NORMAL SUCCESS WARNING
  31. export PREFIX_SUCCESS PREFIX_WARNING PREFIX_FAILURE
  32. # Interactive startup
  33. iprompt="yes" # Wether to display the interactive boot promp
  34. itime="2" # The ammount of time (in seconds) to display the prompt
  35. dlen="29" # The total length of the distro welcome string
  36. ilen="38" # The total length of the interactive message
  37. welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}"
  38. i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"
  39. # Error message displayed when a script's exit value is not zero
  40. print_error_msg()
  41. {
  42. # ${link} and ${error_value} are defined by the rc script
  43. echo -e "${FAILURE}FAILURE: You should not be reading this error message."
  44. echo -e ""
  45. echo -e -n "${FAILURE}It means that an unforseen error took place in"
  46. echo -e -n "${INFO} ${link}"
  47. echo -e "${FAILURE},"
  48. echo -e "${FAILURE}which exited with a return value of ${error_value}."
  49. echo -e ""
  50. echo -e -n "${FAILURE}If you are able to track this error down to a bug"
  51. echo -e "${FAILURE}in one of the files"
  52. echo -e -n "provided by ${INFO}${DISTRO}${FAILURE}, "
  53. echo -e -n "${FAILURE}please be so kind to inform us at "
  54. echo -e "${INFO}${DISTRO_CONTACT}${FAILURE}.${NORMAL}"
  55. echo -e ""
  56. echo -e "${INFO}Press Enter to continue..."
  57. echo -e "${NORMAL}"
  58. read ENTER
  59. }