How can I get daemons started by init.d at boot to coredump on Ubuntu? This is what I have done so far...
echo "ulimit -c unlimited" >> /etc/profile
mkdir /corefiles/
chmod 777 /corefiles/
echo "kernel.core_pattern=/corefiles/core.%e.%u.%t" >> /etc/sysctl.conf
echo "fs.suid_dumpable=1" >> /etc/sysctl.conf
echo "kernel.core_uses_pid = 1" >> /etc/sysctl.conf
sysctl -p
This works great for everything except a daemon that is started by init.d at boot. I am running Ubuntu 10.04. I am looking for a solution that does not involve editing each daemons init.d file.
EDIT: Also, daemons started with sudo do not coredump.