summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/savecore
Commit message (Collapse)AuthorAgeFilesLines
* After writing a kernel core dump into /var/crash, call sync(8).gavin2013-08-281-0/+1
| | | | | | | | | | | | | If we panic again shortly after boot (say, within 30 seconds), any core dump we wrote out may be lost on reboot. In this situation, we really want to keep that core file, as it may be the only way to have the issue resolved. Call sync(8) after writing out the core file and running crashinfo(8), in the hope that these will not be lost if we panic again. sync(8) is only called in the case where there is a core dump to be written out, so won't be called during normal boots. Discovered by: Trying to debug an IPSEC panic MFC after: 1 week
* Fix typo in previous commit: Exit if */dev/dumpdev* does not exist, not ifcperciva2013-03-191-1/+1
| | | | | | | */bin/realpath* does not exist... Submitted by: markj Pointy hat to: cperciva
* If dumpdev is AUTO but no dump device has been set -- i.e., there is no swapcperciva2013-03-191-0/+3
| | | | | | | | | | | | | | | space configured for rc.d/dumpon to designate for dumping -- then exit silently rather than with a > realpath: /dev/dumpdev: No such file or directory error message. An argument could be made that we should print a (more informative) warning message; but given that under the same conditions the rc.d/dumpon script will already print a > No suitable dump device was found warning, it seems that printing an additional > Dump device does not exist. Savecore not run. warning would be superfluous.
* - When checking if a dump exists on the given device there is no need topjd2012-12-141-1/+1
| | | | | | | | | | | | | | | | provide dump directory. Eliminate this redundant argument. This changes the usage, but the only risk here is that a warning will be printed about directory given as device. - Update usage of -C option. - When clearing dump header from the given device there is also no need to provide dump directory, although additional arguments for -c were not documented. - Document that -v can be used with -c and that list of devices can be given. Obtained from: WHEEL Systems
* This change does the following for the scripts that run up throughdougb2010-05-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FILESYSTEMS (the default early_late_divider): 1. Move sysctl to run first 2. Move as many BEFOREs to REQUIREs as possible. 3. Minor effect, move hostid_save from right before mdconfig to right after. A lot of the early scripts make use of sysctl one way or another so running this first makes a lot of sense given that system-critical values are often placed in sysctl.conf. My original purpose for working on this was that while doing some debugging on other stuff I noticed that the order of execution was different in the first pass through the early scripts and the second. In practice that doesn't matter because the scripts are not executed the second time. However this _can_ result in problems if the difference in the rcorder moves a script from the late section to the early section in the second pass (which would mean the script would not get executed). So, I wanted to make the order of execution of the scripts in the early section more deterministic. In the course of debugging the ordering problems I noticed that moving the BEFOREs to REQUIREs prevented the changes in order from the first pass to the second pass without having to make any substantial changes. (Of course it's no secret that I think BEFORE should be avoided as much as possible, but this is a good example of why.) Reviewed by: silence on freebsd-rc@ MFC after: 8.1-RELEASE
* In regards to the "Starting foo:" type messages at boot time, create anddougb2009-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | employ a more generic solution, and use it in the individual rc.d scripts that also have an $rc_quiet test: 1. Add check_startmsgs() to rc.subr. 2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute variations of [ -z "$rc_quiet" ] with check_startmsgs 3. In savecore add a trailing '.' to the end of the message to make it more consistent with other scripts. 4. In newsyslog remove a : before the terminal '.' since we do not expect there to be anything printed out in between to make it more consistent. 5. In the following scripts change "quotes" to 'quotes' where no variables exist in the message: savecore pf newsyslog 6. In the following scripts substitute if/then/fi for the simpler (and more consistent) check_startmsgs &&: faith stf 7. In the following scripts separate the "Starting foo:" from the terminal '.' to make them more consistent: moused hostname pf 8. In nfsclient move the message to its own line to avoid a style bug 9. In pf rc_quiet does not apply to the _stop method, so remove the test there. 10. In motd add 'quotes' around the terminal '.' for consistency
* Add the ability to run /usr/sbin/crashinfo on a new core dump automaticallyjhb2008-08-291-0/+3
| | | | | | | during boot. Right now this is disabled by default, but it can be enabled by setting 'crashinfo_enable=YES' in rc.conf. MFC after: 2 weeks
* Remove the $DUMPDIR variable. It's redundant and the rest of themtm2008-07-061-6/+1
| | | | script uses $dumpdir directly.
* Make checking for the availability of core dumps work in the casemtm2008-07-061-1/+12
| | | | | | that $dumpdev is not set to "AUTO". Reported by: Paul B. Mahol <onemda@gmail.com>
* Run savecore(8) only if there is a core dump to save. If there ismtm2008-06-231-2/+5
| | | | no core dump hide the message to that effect behind $rc_quiet.
* Move a lot of diagnostic output behind $rc_quiet in scripts thatmtm2008-06-231-1/+1
| | | | implement their own start command.
* Remove $NetBSD$ CVS tags. We no longer attempt to synch our rc.d filesdougb2007-12-081-1/+0
| | | | | with theirs, so this information doesn't need to be in the live file. Having it in our CVS history is enough.
* - use `realpath /dev/dumpdev` instead of just /dev/dumpdev so messagesdes2004-10-241-3/+8
| | | | | will show the real device name - show different error messages for missing dump device and directory
* When dumpdev is set to 'auto', and a suitable swap device is found,thomas2004-10-181-2/+5
| | | | | create a symbolic link /dev/dumpdev designating that device so savecore can find and save a previous kernel dump.
* Remove the requirement for the FreeBSD keyword as it no longermtm2004-10-071-1/+1
| | | | | | | makes any sense. Discussed with: dougb, brooks MFC after: 3 days
* Echo and pass dumpdev as the device argument to savecore.davidc2004-03-181-2/+2
| | | | PR: bin/51655
* Mark scripts as not usable inside a jail by adding keyword 'nojail'.pjd2004-03-081-1/+1
| | | | Some suggestions from: rwatson, Ruben de Groot <mail25@bzerk.org>
* Luke Mewburn has indicated that they (NetBSD) are not interestedmtm2004-01-171-34/+18
| | | | | | | | | in keeping the scripts under rc.d in sync with us. So, remove NetBSD specific stuff (which made our scripts more complicated than necessary). The NetBSD ident string will be left intact, both for history and also incase we wish to pull in future versions.
* Luke Mewburn has indicated that they (NetBSD) are not interestedmtm2004-01-171-1/+1
| | | | | | in keeping the scripts under rc.d in sync with us. So, begin removal of NetBSD specific stuff (which made our scripts more complicated than necessary), starting with the NetBSD KEYWORD.
* Convert from `${CMD_OSTYPE}` to ${OSTYPE}. This saves a shell invocation ongordon2002-09-061-2/+2
| | | | OS-dependent case switches.
* Merge in all the changes that Mike Makonnen has been maintaining for agordon2002-06-131-9/+53
| | | | | | | | while. This is only the script pieces, the glue for the build comes next. Submitted by: Mike Makonnen <makonnen@pacbell.net> Reviewed by: silence on -current and -hackers Prodded by: rwatson
* Import the NetBSD 1.5 RC system.obrien2001-06-161-0/+30
Note that `rc' and `rc.shutdown' could not be imported because we already have files with those names.
OpenPOWER on IntegriCloud