# helper functions {{{
if grep -qe debug -qe verbose /proc/cmdline 2>/dev/null ; then
- echo "debug: scripts/init-top/grml running"
+ echo "debug: scripts/init-top/grml running">/dev/console
fi
# get boot command line
# 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
${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
+log_grml_begin_msg "Running $GRML_VERSION"
+echo
+
# don't output anything if running with bootsplash feature
if checkbootparam "splash" ; then
exec >/dev/null </dev/null 2>&1
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