From 9c844bce3ca55c8693c6a96c3fb38fce6339d1ec Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Thu, 13 Aug 2020 13:31:45 +0300 Subject: rc.boot: make the operation silent if 'quiet' was specified on the kernel commandline --- rc.boot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rc.boot b/rc.boot index 7ba1608..56b0460 100755 --- a/rc.boot +++ b/rc.boot @@ -1,5 +1,7 @@ #!/bin/sh # shellcheck disable=1090,1091 +# I would add 2154, but I don't want to accidentally misuse a variable name +# without noticing. # Read the configuration file and the library of # common functions. @@ -35,6 +37,9 @@ out "Parsing kernel commandline..."; { parse_cmdline } +# shellcheck disable=2154 +[ "$quiet" = 1 ] && exec >/dev/null 2>&1 + [ "${dmesg_level:=$loglevel}" ] && { out "Setting dmesg level..." dmesg -n "$dmesg_level" -- cgit v1.2.3