5 echo "debug: scripts/init-top/grml running"
7 # get boot command line
8 CMDLINE="$(cat /proc/cmdline)"
12 case "$(cat $2)" in *$1*) return 0;; esac
18 case "$2" in *$1*) return 0;; esac
22 # Reread boot command line; echo last parameter's argument or return false.
24 stringinstring " $1=" "$CMDLINE" || return 1
25 result="${CMDLINE##*$1=}"
26 result="${result%%[ ]*}"
31 # Check boot commandline for specified option
33 stringinstring " $1" "$CMDLINE"
37 if checkbootparam "nocolor" ; then
38 echo "Disabling colors in bootsequence as requested on commandline."
42 # Erase to end of line
44 # Clear and reset Screen
50 # Erase to end of line
52 # Clear and reset Screen
56 # RED: Failure or error message
58 # GREEN: Success message
60 # YELLOW: Descriptions
62 # BLUE: System mesages
64 # MAGENTA: Found devices or drivers
72 log_grml_failure_msg () {
73 echo -n " ${RED}*${NORMAL} $@"
76 # int log_grml_begin_message (char *message)
77 log_grml_begin_msg () {
78 echo -n " ${GREEN}*${NORMAL} $@"
81 log_grml_warn_msg () {
82 echo -n " ${YELLOW}*${NORMAL} $@"
85 # int log_grml_end_message (int exitstatus)
86 SUCCESS=" ${BLUE}[ ${GREEN}ok ${BLUE}]${NORMAL}"
87 FAILED=" ${NORMAL}[${RED}fail${NORMAL}]"
93 DISTRI="$(getbootparam 'distri' 2>/dev/null)"
94 if [ -n "$DISTRI" ] ; then
98 ${WHITE}based on grml.org.
103 ${RED} ____ ____ __ __ _
104 ${RED} / ___| _ \| \/ | |
105 ${RED} | | _| |_) | |\/| | |
106 ${RED} | |_| | _ <| | | | |___
107 ${RED} \____|_| \_\_| |_|_____|
109 ${WHITE}grml.org - Linux for sysadmins and texttool users.
114 echo "${WHITE}Welcome to"
117 # don't output anything if running with bootsplash feature
118 if checkbootparam "splash" ; then
119 exec >/dev/null </dev/null 2>&1
123 # No kernel messages while probing modules:
124 if ! grep -qe debug -qe verbose /proc/cmdline 2>/dev/null ; then
125 [ -r /proc/sys/kernel/printk ] && echo "0" > /proc/sys/kernel/printk
128 if grep -q 'boot=live' /proc/cmdline 2>/dev/null ; then
129 log_grml_begin_msg "Finished early booting sequence." ; echo "$SUCCESS"
130 log_grml_begin_msg "Searching for GRML file, this might take a few seconds..."
134 # vim: foldmethod=marker expandtab ai ft=sh