5 if grep -qe debug -qe verbose /proc/cmdline 2>/dev/null ; then
6 echo "debug: scripts/init-top/grml running"
9 # get boot command line
10 CMDLINE="$(cat /proc/cmdline)"
14 case "$(cat $2)" in *$1*) return 0;; esac
20 case "$2" in *$1*) return 0;; esac
24 # Reread boot command line; echo last parameter's argument or return false.
26 stringinstring " $1=" "$CMDLINE" || return 1
27 result="${CMDLINE##*$1=}"
28 result="${result%%[ ]*}"
33 # Check boot commandline for specified option
35 stringinstring " $1" "$CMDLINE"
39 if checkbootparam "nocolor" ; then
40 echo "Disabling colors in bootsequence as requested on commandline."
44 # Erase to end of line
46 # Clear and reset Screen
52 # Erase to end of line
54 # Clear and reset Screen
58 # RED: Failure or error message
60 # GREEN: Success message
62 # YELLOW: Descriptions
64 # BLUE: System mesages
66 # MAGENTA: Found devices or drivers
74 log_grml_failure_msg () {
75 echo -n " ${RED}*${NORMAL} $@"
78 # int log_grml_begin_message (char *message)
79 log_grml_begin_msg () {
80 echo -n " ${GREEN}*${NORMAL} $@"
83 log_grml_warn_msg () {
84 echo -n " ${YELLOW}*${NORMAL} $@"
87 # int log_grml_end_message (int exitstatus)
88 SUCCESS=" ${BLUE}[ ${GREEN}ok ${BLUE}]${NORMAL}"
89 FAILED=" ${NORMAL}[${RED}fail${NORMAL}]"
95 DISTRI="$(getbootparam 'distri' 2>/dev/null)"
96 if [ -n "$DISTRI" ] ; then
100 ${WHITE}based on grml.org.
105 ${RED} ____ ____ __ __ _
106 ${RED} / ___| _ \| \/ | |
107 ${RED} | | _| |_) | |\/| | |
108 ${RED} | |_| | _ <| | | | |___
109 ${RED} \____|_| \_\_| |_|_____|
111 ${WHITE}grml.org - Linux for sysadmins and texttool users.
116 echo "${WHITE}Welcome to"
119 # don't output anything if running with bootsplash feature
120 if checkbootparam "splash" ; then
121 exec >/dev/null </dev/null 2>&1
125 # No kernel messages while probing modules:
126 if ! grep -qe debug -qe verbose /proc/cmdline 2>/dev/null ; then
127 [ -r /proc/sys/kernel/printk ] && echo "0" > /proc/sys/kernel/printk
130 # Make sure we support squashfs:
131 if ! grep -q squashfs /proc/filesystems ; then
132 modprobe -q squashfs || log_grml_failure_msg "Warning: look like you do not have support for squashfs"
135 if grep -q 'boot=live' /proc/cmdline 2>/dev/null ; then
136 log_grml_begin_msg "Finished early booting sequence." ; echo "$SUCCESS"
137 log_grml_begin_msg "Searching for GRML file, this might take a few seconds..."
141 # vim: foldmethod=marker expandtab ai ft=sh