From 8f9aaabaa7429be72599008ec5eb500a0a273253 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 10 May 2025 22:20:18 -0500 Subject: rename boot_config and add core dump file prevention --- root_scripts/system_boot_config.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 root_scripts/system_boot_config.sh (limited to 'root_scripts/system_boot_config.sh') diff --git a/root_scripts/system_boot_config.sh b/root_scripts/system_boot_config.sh new file mode 100755 index 0000000..9e54037 --- /dev/null +++ b/root_scripts/system_boot_config.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# Craig Jennings +# speeds and tidies the boot sequence + +# ensure root +if ! [ $(id -u) -eq 0 ] +then + echo "Must run as root. Exiting." + exit +fi + +# disable devil icon in boot menu +sysrc -f /boot/loader.conf loader_logo="none" + +# hide kernel diagnostics +sysrc -f /boot/loader.conf boot_mute="YES" + +# reduce default wait time before boot +sysrc -f /boot/loader.conf autoboot_delay=2 + +# don't print start messages +sysrc rc_startmsgs=NO + +# create console.log with the proper permissions +touch /var/log/console.log +chmod 600 /var/log/console.log + +# move from printing errors to the console to printing them to the above console.log file +sed -i '' 's#/dev/console#/var/log/console.log#' /etc/syslog.conf + +# prevent core dumps +echo "kern.coredump=0" >> /etc/sysctl.conf -- cgit v1.2.3