helloSystem / ISO

helloSystem Live and installation ISO
https://github.com/helloSystem/
BSD 3-Clause "New" or "Revised" License
806 stars 58 forks source link

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

Open probonopd opened 2 years ago

probonopd commented 2 years ago
# 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 commented 2 years ago

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 commented 2 years ago

Maybe put it in /etc/rc.local?