rc.site 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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/network"
  6. # Bootlogging (requires a tempfs mount)
  7. BOOTLOG_ENAB="yes"
  8. # Hostname
  9. HOSTNAME=<lfs>
  10. # System time variables
  11. UTC=1
  12. CLOCKPARAMS=
  13. # Manual input is not appropriate on remote systems. Define what happens when
  14. # an error is encountered that interupts the boot/shutdown proceess
  15. FAILURE_ACTION="read ENTER"
  16. # Distro Information
  17. DISTRO="Linux From Scratch" # The distro name
  18. DISTRO_CONTACT="lfs-dev@linuxfromscratch.org" # Bug report address
  19. DISTRO_MINI="lfs" # Short name used in filenames for distro config
  20. # Define custom colors used in messages printed to the screen
  21. BRACKET="\\033[1;34m" # Blue
  22. FAILURE="\\033[1;31m" # Red
  23. INFO="\\033[1;36m" # Cyan
  24. NORMAL="\\033[0;39m" # Grey
  25. SUCCESS="\\033[1;32m" # Green
  26. WARNING="\\033[1;33m" # Yellow
  27. # Prefix boot messages for easier reading on framebuffer consoles
  28. PREFIX_SUCCESS=" ${SUCCESS}*${NORMAL} "
  29. PREFIX_WARNING="${WARNING}**${NORMAL} "
  30. PREFIX_FAILURE="${FAILURE}***${NORMAL}"
  31. # Export varialbles so that they are inherited by the initscripts
  32. export RC_BASE RC_FUNCTIONS NETWORK_DEVICES BOOTLOG_ENAB
  33. export HOSTNAME UTC CLOCKPARAMS FAILURE_ACTION
  34. export DISTRO DISTRO_CONTACT DISTRO_MINI
  35. export BRACKET FAILURE INFO NORMAL SUCCESS WARNING
  36. export PREFIX_SUCCESS PREFIX_WARNING PREFIX_FAILURE
  37. # Interactive startup
  38. iprompt="yes" # Wether to display the interactive boot promp
  39. itime="2" # The ammount of time (in seconds) to display the prompt
  40. dlen="29" # The total length of the distro welcome string
  41. ilen="38" # The total length of the interactive message
  42. welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}"
  43. i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup"
  44. # Error message displayed when a script's exit value is not zero
  45. print_error_msg()
  46. {
  47. # ${link} and ${error_value} are defined by the rc script
  48. echo -e "${FAILURE}FAILURE: You should not be reading this error message."
  49. echo -e ""
  50. echo -e -n "${FAILURE}It means that an unforseen error took place in"
  51. echo -e -n "${INFO} ${link}"
  52. echo -e "${FAILURE},"
  53. echo -e "${FAILURE}which exited with a return value of ${error_value}."
  54. echo -e ""
  55. echo -e -n "${FAILURE}If you are able to track this error down to a bug"
  56. echo -e "${FAILURE}in one of the files"
  57. echo -e -n "provided by ${INFO}${DISTRO}${FAILURE}, "
  58. echo -e -n "${FAILURE}please be so kind to inform us at "
  59. echo -e "${INFO}${DISTRO_CONTACT}${FAILURE}.${NORMAL}"
  60. echo -e ""
  61. echo -e "${INFO}Press Enter to continue..."
  62. echo -e "${NORMAL}"
  63. $FAILURE_ACTION
  64. }