From 98b4e5c9e30327bb3acc595bbfd3f5e2d967be80 Mon Sep 17 00:00:00 2001 From: Sebastien Luttringer Date: Sat, 2 Apr 2011 15:33:51 +0200 Subject: Fix console verbosity and add config via rc.conf This patch fix verbosity which use var exported by initcpio in place of kernel. Verbosity is an initscripts parameter, so it should have a definition in rc.conf. Kernel parameter should be a shortcut. New option is called VERBOSE. Signed-off-by: Sebastien Luttringer --- rc.conf | 2 ++ rc.sysinit | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/rc.conf b/rc.conf index 77dcf3a..7d03a30 100644 --- a/rc.conf +++ b/rc.conf @@ -17,6 +17,7 @@ # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US) # CONSOLEMAP: found in /usr/share/kbd/consoletrans # USECOLOR: use ANSI color sequences in startup messages +# VERBOSE: Verbose level (from 1 to 8). man 3 syslog for level info # LOCALE="en_US.UTF-8" DAEMON_LOCALE="no" @@ -26,6 +27,7 @@ KEYMAP="us" CONSOLEFONT= CONSOLEMAP= USECOLOR="yes" +VERBOSE="3" # ----------------------------------------------------------------------- # HARDWARE diff --git a/rc.sysinit b/rc.sysinit index 1839280..b89d62f 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -34,13 +34,12 @@ fi # start up our mini logger until syslog takes over /sbin/minilogd -# anything more serious than KERN_WARNING goes to the console -# 'verbose' cmdline parameter enables more messages -if [[ -n "$verbose" ]]; then - /bin/dmesg -n 8 -else - /bin/dmesg -n 3 -fi +# Set console verbosity +for cmdarg in $(< /proc/cmdline); do + [[ "$cmdarg" == verbose ]] && VERBOSE=8 && break + [[ "$cmdarg" =~ verbose=[1-8] ]] && VERBOSE=${BASH_REMATCH[0]-8} && break +done +/bin/dmesg -n ${VERBOSE:-3} HWCLOCK_PARAMS="--hctosys" case $HARDWARECLOCK in -- cgit v1.2.3