Skip to content

Commit

Permalink
05core: drop duplicate sysctl dropin to lower printk level
Browse files Browse the repository at this point in the history
This doesn't work anymore since systemd locked down where generators
can write files:

    [    9.246494] /usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator: line 24: /etc/sysctl.d/20-coreos-autologin-kernel-printk.conf: Read-only file system

But anyway, nowadays this duplicates `coreos-printk-quiet.service` which
was added two years after this code was written (coreos#1840).

Noticed by Colin in
ostreedev/ostree#3158 (comment).
  • Loading branch information
jlebon authored and aaradhak committed Mar 18, 2024
1 parent f031707 commit 3fd75c1
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ ExecStart=-/sbin/agetty --autologin core -o '-p -f core' ${args} %I \$TERM
EOF
}

quiet_kernel_console_messages() {
cat <<'EOF' > /etc/sysctl.d/20-coreos-autologin-kernel-printk.conf
# Raise console message logging level from DEBUG (7) to WARNING (4)
# so that kernel debug message don't get interspersed on the console
# that
# may frustrate a user trying to interactively do an install with
# nmtui and coreos-installer.
kernel.printk=4
EOF
}

write_interactive_live_motd() {
# Write motd to a tmp file and not directly to /etc/motd because
# SELinux denies write from init_t to etc_t
Expand Down Expand Up @@ -93,13 +82,6 @@ write_dropin "getty@.service" "--noclear"
# Also autologin on serial console if someone enables that
write_dropin "serial-getty@.service" "--keep-baud 115200,38400,9600"

# When the installer runs a lot of things happen on the system (audit
# messages from running via sudo, re-reading partition table messages,
# mounting filesystem messages, etc.). Quieting the verbosity of the
# kernel console will help us keep our sanity.
quiet_kernel_console_messages


# Write an motd that will let the user know about the live environment
# and what is possible.
write_interactive_live_motd

0 comments on commit 3fd75c1

Please sign in to comment.