if [ -f /var/tmp/core ]
then
	date
	ls -l /var/tmp
	if [ /usr/local/libexec/ipsec/pluto -ot /var/tmp/core ]
	then
		gdb /usr/local/libexec/ipsec/pluto /var/tmp/core <<\EOF
where
quit
EOF
		# Try to avoid reporting more than once.
		# Avoid accumulation of cores.
		# accumulate: mv --backup=numbered core core.old
		mv -f core core.old
	else
		echo "core appears to be older than pluto"
		ls -l /usr/local/libexec/ipsec/pluto
	fi
fi
