aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorSebastien Luttringer <seblu@seblu.net>2011-04-02 15:33:51 +0200
committerSebastien Luttringer <seblu@seblu.net>2011-04-15 16:29:36 +0200
commit98b4e5c9e30327bb3acc595bbfd3f5e2d967be80 (patch)
treef0b4f2bbff6e948f46b4247ca743b53b5232d95a /rc.sysinit
parent23afb988d59c6167b33353155cf8fafef3c5855a (diff)
downloadinitscripts-98b4e5c9e30327bb3acc595bbfd3f5e2d967be80.tar.xz
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 <seblu@seblu.net>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit13
1 files changed, 6 insertions, 7 deletions
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