ISO icon indicating copy to clipboard operation
ISO copied to clipboard

Enable core dumps to /tmp if the system was booted without boot_mute

Open probonopd opened this issue 4 years ago • 2 comments

# Enable core dumps to /tmp if the system was booted without boot_mute
if [ "$(sysctl -q -n kern.consmute)" = "0" ] ; then
  sysctl savecore_enable="YES" # Kernel dumps
  sysctl kern.coredump=1
  sysctl kern.corefile="/tmp/%N.core"
fi

But where to run this? Put it into its own rc file?

probonopd avatar Nov 22 '21 14:11 probonopd

While we are at it, we should probably replace other occurences of

if [ "$(kenv boot_mute 2>/dev/null)" = "YES" ] ; then

with

if [ "$(sysctl -q -n kern.consmute)" = "0" ] ; then

as well to make it more robust?

probonopd avatar Nov 22 '21 14:11 probonopd

Maybe put it in /etc/rc.local?

probonopd avatar Nov 22 '21 14:11 probonopd