diff options
author | cperciva <cperciva@FreeBSD.org> | 2013-03-19 04:42:04 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2013-03-19 04:42:04 +0000 |
commit | 262a11c529f194dec0596e6060cf2633a75012e7 (patch) | |
tree | 395c4d173f68e92c47c057c4495cdfbb4ff5fb39 /etc | |
parent | c5b34b3787feb4120276b90e0aefa24f9c84ff5c (diff) | |
download | FreeBSD-src-262a11c529f194dec0596e6060cf2633a75012e7.zip FreeBSD-src-262a11c529f194dec0596e6060cf2633a75012e7.tar.gz |
If dumpdev is AUTO but no dump device has been set -- i.e., there is no swap
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.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.d/savecore | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore index 3e61adc..521c606 100755 --- a/etc/rc.d/savecore +++ b/etc/rc.d/savecore @@ -23,6 +23,9 @@ savecore_prestart() return 1 ;; [Aa][Uu][Tt][Oo]) + if [ ! -L /bin/realpath ]; then + return 1 + fi dumpdev=`/bin/realpath /dev/dumpdev` ;; esac |