Date: Sun, 10 Mar 2002 14:10:02 -0800 (PST) From: "Crist J. Clark" <cjc@FreeBSD.ORG> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/35725: /etc/rc should create missing "dumpdir". Message-ID: <200203102210.g2AMA2172535@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/35725; it has been noted by GNATS.
From: "Crist J. Clark" <cjc@FreeBSD.ORG>
To: "Gary W. Swearingen" <swear@blarg.net>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/35725: /etc/rc should create missing "dumpdir".
Date: Sun, 10 Mar 2002 14:07:51 -0800
On Sat, Mar 09, 2002 at 09:57:40PM -0800, Gary W. Swearingen wrote:
[snip]
> A good (?) and simple enhancement would be to have the code in /etc/rc
> which checks for a missing "dumpdir" create it after it determines that
> it is missing.
I don't think that is a good idea (what if $dumpdev was fat fingered
someplace is shouldn't be and say, filled up your root
filesystem). However, it currently fails silently, which I don't think
is good either. How about have rc(8) bitch about it,
Index: etc/rc
===================================================================
RCS file: /export/freebsd/ncvs/src/etc/rc,v
retrieving revision 1.296
diff -u -r1.296 rc
--- etc/rc 17 Feb 2002 22:19:14 -0000 1.296
+++ etc/rc 10 Mar 2002 22:02:56 -0000
@@ -554,10 +554,14 @@
;;
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 [ -d "${dumpdir}" ]; then
+ echo -n 'Checking for core dump: '
+ /sbin/savecore ${savecore_flags} "${dumpdir}"
+ else
+ echo "dumpdir directory does not exist: ${dumpdir}"
+ fi
fi
;;
esac
--
Crist J. Clark | cjclark@alum.mit.edu
| cjclark@jhu.edu
http://people.freebsd.org/~cjc/ | cjc@freebsd.org
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203102210.g2AMA2172535>
