summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorcjc <cjc@FreeBSD.org>2002-03-11 08:47:02 +0000
committercjc <cjc@FreeBSD.org>2002-03-11 08:47:02 +0000
commit352806ecf32064d3f84e690dc624e0a0aac0507b (patch)
treebeea47b4d820f478eb302713d2683e32de1ef634 /etc
parentb32f8d14b134b99cfbf278cdd8ef43cde64f8c05 (diff)
downloadFreeBSD-src-352806ecf32064d3f84e690dc624e0a0aac0507b.zip
FreeBSD-src-352806ecf32064d3f84e690dc624e0a0aac0507b.tar.gz
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
Diffstat (limited to 'etc')
-rw-r--r--etc/rc11
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/rc b/etc/rc
index 345959b..40a26d8 100644
--- a/etc/rc
+++ b/etc/rc
@@ -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
OpenPOWER on IntegriCloud