summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-06-30 16:43:04 +0200
committerDave Reisner <dreisner@archlinux.org>2013-07-01 17:03:43 +0200
commit99c790b22382d888853509b49526c64eb812b0ae (patch)
tree08061160073d537d4dc5da02233a4c6f00e34038
parent3f56800753e1e0c3db0e6c4ac77b0c4dc95a8491 (diff)
downloadmkinitcpio-99c790b22382d888853509b49526c64eb812b0ae.tar.gz
mkinitcpio-99c790b22382d888853509b49526c64eb812b0ae.tar.xz
rdlogger: log messages which would have been hidden by quiet
This allows 'quiet rd.log=kmsg' to produce a silent boot while still logging the full output that would have been written to the console. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--init1
-rw-r--r--init_functions7
2 files changed, 7 insertions, 1 deletions
diff --git a/init b/init
index 2578cf8..5c2d751 100644
--- a/init
+++ b/init
@@ -76,6 +76,7 @@ if [ "${break}" = "postmount" ]; then
launch_interactive_shell
fi
+# this should always be the last thing we do before the switch_root.
rdlogger_stop
exec env -i \
diff --git a/init_functions b/init_functions
index 152da7f..f356a14 100644
--- a/init_functions
+++ b/init_functions
@@ -326,6 +326,11 @@ rdlogger_start() {
exec >/run/initramfs/rdlogger.pipe 2>&1
[ -n "$rd_debug" ] && set -x
+
+ # messages would be otherwise lost if we don't unset quiet. this does,
+ # however, mean that passing rd.log=console will negate the effects of
+ # 'quiet' for initramfs console output.
+ unset quiet
}
rdlogger_stop() {
@@ -361,7 +366,7 @@ rdlogger() {
# will Do The Right Thing™.
# rd.log=console
- if [ -z "$quiet" ] && bitfield_has_bit "$rd_logmask" "$_rdlog_cons"; then
+ if bitfield_has_bit "$rd_logmask" "$_rdlog_cons"; then
exec 4>/dev/console
else
exec 4>/dev/null