Don't protect savecore(8) from being run with a bad dumpdir

argument. Don't fail silently, but let savecore(8) make noise. It
won't behave badly, it doesn't need protection.

At the same time, allow the administrator to have dumpdev enabled
while dumpdir (savecore(8)) is disabled and document how to do it.

PR:		conf/35725
This commit is contained in:
cjc 2002-03-11 08:47:02 +00:00
parent b32f8d14b1
commit 352806ecf3
2 changed files with 15 additions and 3 deletions

11
etc/rc
View File

@ -552,12 +552,17 @@ case ${dumpdev} in
'')
dumpdir='/var/crash'
;;
[Nn][Oo])
dumpdir='NO'
;;
esac
if [ -e "${dumpdev}" -a -d "${dumpdir}" ]; then
if [ -e "${dumpdev}" ]; then
/sbin/dumpon -v ${dumpdev}
echo -n 'Checking for core dump: '
/sbin/savecore ${savecore_flags} "${dumpdir}"
if [ "$dumpdir" != 'NO' ]; then
echo -n 'Checking for core dump: '
/sbin/savecore ${savecore_flags} "${dumpdir}"
fi
fi
;;
esac

View File

@ -1727,6 +1727,13 @@ specified by the
variable.
The default value is
.Dq /var/crash .
Set to
.Dq NO
to not run
.Xr savecore 8
at boot time when
.Va dumpdir
is set.
.It Va enable_quotas
.Pq Vt bool
Set to