X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=initramfs%2Fscripts%2Finit-top%2Fgrml;fp=initramfs%2Fscripts%2Finit-top%2Fgrml;h=0000000000000000000000000000000000000000;hb=cfd32a33aab0d28608bba9e34c65b2a1967be9b7;hp=43942ba3cbeecb323805050544f4f78491605edb;hpb=de6d7ed3e096db257ca1434c895ff69e3b0ef481;p=grml-live.git diff --git a/initramfs/scripts/init-top/grml b/initramfs/scripts/init-top/grml deleted file mode 100755 index 43942ba..0000000 --- a/initramfs/scripts/init-top/grml +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/sh - -# helper functions {{{ - -echo "debug: scripts/init-top/grml running" - -# get boot command line -CMDLINE="$(cat /proc/cmdline)" - -# Simple shell grep -stringinfile(){ - case "$(cat $2)" in *$1*) return 0;; esac - return 1 -} - -# same for strings -stringinstring(){ - case "$2" in *$1*) return 0;; esac - return 1 -} - -# Reread boot command line; echo last parameter's argument or return false. -getbootparam(){ - stringinstring " $1=" "$CMDLINE" || return 1 - result="${CMDLINE##*$1=}" - result="${result%%[ ]*}" - echo "$result" - return 0 -} - -# Check boot commandline for specified option -checkbootparam(){ - stringinstring " $1" "$CMDLINE" - return "$?" -} - -if checkbootparam "nocolor" ; then - echo "Disabling colors in bootsequence as requested on commandline." - # Reset fb color mode - RESET="]R" - # ANSI COLORS - # Erase to end of line - CRE=" " - # Clear and reset Screen - CLEAR="c" -else - # Reset fb color mode - RESET="]R" - # ANSI COLORS - # Erase to end of line - CRE=" " - # Clear and reset Screen - CLEAR="c" - # Normal color - NORMAL="" - # RED: Failure or error message - RED="" - # GREEN: Success message - GREEN="" - # YELLOW: Descriptions - YELLOW="" - # BLUE: System mesages - BLUE="" - # MAGENTA: Found devices or drivers - MAGENTA="" - # CYAN: Questions - CYAN="" - # BOLD WHITE: Hint - WHITE="" -fi - -log_grml_failure_msg () { - echo -n " ${RED}*${NORMAL} $@" -} - -# int log_grml_begin_message (char *message) -log_grml_begin_msg () { - echo -n " ${GREEN}*${NORMAL} $@" -} - -log_grml_warn_msg () { - echo -n " ${YELLOW}*${NORMAL} $@" -} - -# int log_grml_end_message (int exitstatus) -SUCCESS=" ${BLUE}[ ${GREEN}ok ${BLUE}]${NORMAL}" -FAILED=" ${NORMAL}[${RED}fail${NORMAL}]" - -# }}} - -# welcome splash {{{ - -DISTRI="$(getbootparam 'distri' 2>/dev/null)" -if [ -n "$DISTRI" ] ; then -SPLASH=" -${RED} $DISTRI - -${WHITE}based on grml.org. - -${NORMAL}" -else -SPLASH=" -${RED} ____ ____ __ __ _ -${RED} / ___| _ \| \/ | | -${RED} | | _| |_) | |\/| | | -${RED} | |_| | _ <| | | | |___ -${RED} \____|_| \_\_| |_|_____| - -${WHITE}grml.org - Linux for sysadmins and texttool users. -${NORMAL}" -fi - -echo "" -echo "${WHITE}Welcome to" -echo "$SPLASH" - -# don't output anything if running with bootsplash feature -if checkbootparam "splash" ; then - exec >/dev/null &1 -fi -# }}} - -# No kernel messages while probing modules: -if ! grep -qe debug -qe verbose /proc/cmdline 2>/dev/null ; then - [ -r /proc/sys/kernel/printk ] && echo "0" > /proc/sys/kernel/printk -fi - -if grep -q 'boot=live' /proc/cmdline 2>/dev/null ; then - log_grml_begin_msg "Finished early booting sequence." ; echo "$SUCCESS" - log_grml_begin_msg "Searching for GRML file, this might take a few seconds..." - echo -fi - -# vim: foldmethod=marker expandtab ai ft=sh