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