aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rc')
-rw-r--r--libexec/rc/rc.conf4
-rwxr-xr-xlibexec/rc/rc.d/dumpon9
-rwxr-xr-xlibexec/rc/rc.d/savecore4
3 files changed, 11 insertions, 6 deletions
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf
index 06fda945e86e..8884fab7e016 100644
--- a/libexec/rc/rc.conf
+++ b/libexec/rc/rc.conf
@@ -643,7 +643,9 @@ lpd_flags="" # Flags to lpd (if enabled).
nscd_enable="NO" # Run the nsswitch caching daemon.
chkprintcap_enable="NO" # Run chkprintcap(8) before running lpd.
chkprintcap_flags="-d" # Create missing directories by default.
-dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO).
+dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO);
+ # this should be commented out here
+ # for stable branches to respect kenv.
dumpon_flags="" # Options to pass to dumpon(8), followed by dumpdev.
dumpdir="/var/crash" # Directory where crash dumps are to be stored
savecore_enable="YES" # Extract core from dump devices if any
diff --git a/libexec/rc/rc.d/dumpon b/libexec/rc/rc.d/dumpon
index 6ca335b73842..ed43c4a24762 100755
--- a/libexec/rc/rc.d/dumpon
+++ b/libexec/rc/rc.d/dumpon
@@ -52,15 +52,18 @@ dumpon_start()
# early so a crash early in the boot process can be caught.
#
case ${dumpdev} in
- [Nn][Oo] | '')
+ [Nn][Oo])
;;
- [Aa][Uu][Tt][Oo])
+ [Aa][Uu][Tt][Oo] | '')
root_hold_wait
dev=$(/bin/kenv -q dumpdev)
if [ -n "${dev}" ] ; then
dumpon_try "${dev}"
return $?
fi
+ if [ -z ${dumpdev} ] ; then
+ return
+ fi
while read dev mp type more ; do
[ "${type}" = "swap" ] || continue
case ${dev} in
@@ -85,7 +88,7 @@ dumpon_start()
dumpon_stop()
{
case ${dumpdev} in
- [Nn][Oo] | '')
+ [Nn][Oo])
;;
*)
rm -f /dev/dumpdev
diff --git a/libexec/rc/rc.d/savecore b/libexec/rc/rc.d/savecore
index 5d8204a1e805..e7186699a176 100755
--- a/libexec/rc/rc.d/savecore
+++ b/libexec/rc/rc.d/savecore
@@ -20,11 +20,11 @@ savecore_prestart()
{
# Quit if we have no dump device
case ${dumpdev} in
- [Nn][Oo] | '')
+ [Nn][Oo])
debug 'No dump device. Quitting.'
return 1
;;
- [Aa][Uu][Tt][Oo])
+ [Aa][Uu][Tt][Oo] | '')
if [ ! -L /dev/dumpdev ]; then
return 1
fi