aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-08-13 13:31:45 +0300
committerCem Keylan <cem@ckyln.com>2020-08-13 13:31:45 +0300
commit9c844bce3ca55c8693c6a96c3fb38fce6339d1ec (patch)
tree5dcb3a50242c926c50317f0589fb4f438da5a933
parent2778ceacc3cb49690fc375fce6267881d8c6e61c (diff)
downloadinit-9c844bce3ca55c8693c6a96c3fb38fce6339d1ec.tar.gz
rc.boot: make the operation silent if 'quiet' was specified on the kernel commandline
-rwxr-xr-xrc.boot5
1 files changed, 5 insertions, 0 deletions
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"