aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2023-07-02 07:54:57 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2023-07-02 07:54:57 +0000
commitccc806a049383e5611b3752e6f384cf03a208039 (patch)
tree1170e60f054df513f7c85d635f5fb995aa480896 /libexec/rc
parent005aa1743b42b52fbd49b9d5ec44816902b6ee9f (diff)
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