Run dumpon(8) early so crashes during startup can be caught. In
addition, take out the checks on the $dumpdev. dumpon(8) behaves well if given a non-existent filename. It gives a nice error message which is better rather than the current silent failure. Reviewed by: des
This commit is contained in:
parent
f11a52179b
commit
17b6d49a7c
31
etc/rc
31
etc/rc
@ -108,6 +108,17 @@ chkdepend NFS nfs_server_enable portmap portmap_enable
|
||||
chkdepend NIS nis_server_enable portmap portmap_enable
|
||||
chkdepend NIS nis_client_enable portmap portmap_enable
|
||||
|
||||
# Enable dumpdev early so that a crash during the boot process can be caught.
|
||||
#
|
||||
case ${dumpdev} in
|
||||
[Nn][Oo] | '')
|
||||
dumpdev='NO'
|
||||
;;
|
||||
*)
|
||||
/sbin/dumpon -v ${dumpdev}
|
||||
;;
|
||||
esac
|
||||
|
||||
# Enable harvesting of entropy via devices. The sooner this happens the
|
||||
# better so that we can take advantage of the boot process.
|
||||
#
|
||||
@ -540,14 +551,10 @@ else
|
||||
dev_mkdb
|
||||
fi
|
||||
|
||||
# Enable dumpdev so that savecore can see it.
|
||||
# /var/crash should be a directory or a symbolic link
|
||||
# $dumpdir should be a directory or a symbolic link
|
||||
# to the crash directory if core dumps are to be saved.
|
||||
#
|
||||
case ${dumpdev} in
|
||||
[Nn][Oo] | '')
|
||||
;;
|
||||
*)
|
||||
if [ "${dumpdev}" != 'NO' ]; then
|
||||
case ${dumpdir} in
|
||||
'')
|
||||
dumpdir='/var/crash'
|
||||
@ -557,15 +564,11 @@ case ${dumpdev} in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -e "${dumpdev}" ]; then
|
||||
/sbin/dumpon -v ${dumpdev}
|
||||
if [ "$dumpdir" != 'NO' ]; then
|
||||
echo -n 'Checking for core dump: '
|
||||
/sbin/savecore ${savecore_flags} "${dumpdir}"
|
||||
fi
|
||||
if [ "${dumpdir}" != 'NO' ]; then
|
||||
echo -n 'Checking for core dump: '
|
||||
/sbin/savecore ${savecore_flags} "${dumpdir}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -n "${network_pass1_done}" ]; then
|
||||
network_pass2
|
||||
|
Loading…
x
Reference in New Issue
Block a user