X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Flive-initramfs%2Fgrml-script.init-top;h=462642dfe24dd759fe02487de9907390c315da37;hb=c8546cb8d8d0870c6993343a7b5cfe27694cbf4e;hp=43942ba3cbeecb323805050544f4f78491605edb;hpb=cfd32a33aab0d28608bba9e34c65b2a1967be9b7;p=grml-live.git diff --git a/etc/grml/fai/live-initramfs/grml-script.init-top b/etc/grml/fai/live-initramfs/grml-script.init-top index 43942ba..462642d 100755 --- a/etc/grml/fai/live-initramfs/grml-script.init-top +++ b/etc/grml/fai/live-initramfs/grml-script.init-top @@ -1,8 +1,27 @@ #!/bin/sh +# prereq header {{{ +# without this header booting will fail with: +# "PANIC: Circular dependancy. Exiting." +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac +# }}} + # helper functions {{{ -echo "debug: scripts/init-top/grml running" +if grep -qe debug -qe verbose /proc/cmdline 2>/dev/null ; then + echo "debug: scripts/init-top/grml running">/dev/console +fi # get boot command line CMDLINE="$(cat /proc/cmdline)" @@ -91,6 +110,11 @@ FAILED=" ${NORMAL}[${RED}fail${NORMAL}]" # welcome splash {{{ DISTRI="$(getbootparam 'distri' 2>/dev/null)" + +if [ -r /etc/grml_version ] ; then + GRML_VERSION="$(cat /etc/grml_version)" +fi + if [ -n "$DISTRI" ] ; then SPLASH=" ${RED} $DISTRI @@ -106,13 +130,18 @@ ${RED} | | _| |_) | |\/| | | ${RED} | |_| | _ <| | | | |___ ${RED} \____|_| \_\_| |_|_____| -${WHITE}grml.org - Linux for sysadmins and texttool users. -${NORMAL}" +${WHITE}grml.org - Linux for sysadmins and texttool users.${NORMAL}" fi echo "" echo "${WHITE}Welcome to" echo "$SPLASH" +echo + +if [ -n "$GRML_VERSION" ] ; then + log_grml_begin_msg "Running $GRML_VERSION" + echo +fi # don't output anything if running with bootsplash feature if checkbootparam "splash" ; then @@ -120,15 +149,22 @@ if checkbootparam "splash" ; then fi # }}} +## /proc/cmdline handling {{{ # 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 +# Make sure we support squashfs: +if ! grep -q squashfs /proc/filesystems ; then + modprobe -q squashfs || log_grml_failure_msg "Warning: look like you do not have support for squashfs" +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 + echo fi +## }}} # vim: foldmethod=marker expandtab ai ft=sh