diff options
author | mtm <mtm@FreeBSD.org> | 2004-01-17 10:59:43 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2004-01-17 10:59:43 +0000 |
commit | 5da6236d0167eab4e233aaf815198eb7d1fe5898 (patch) | |
tree | 6439610462f4b5b56816a33d4ba3c60ab1fe1868 /etc/rc.d/savecore | |
parent | 7948e91c15e85d387bf8070d18fd9257a7d982be (diff) | |
download | FreeBSD-src-5da6236d0167eab4e233aaf815198eb7d1fe5898.zip FreeBSD-src-5da6236d0167eab4e233aaf815198eb7d1fe5898.tar.gz |
Luke Mewburn has indicated that they (NetBSD) are not interested
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.
Diffstat (limited to 'etc/rc.d/savecore')
-rwxr-xr-x | etc/rc.d/savecore | 52 |
1 files changed, 18 insertions, 34 deletions
diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore index c31343e..47e84c2 100755 --- a/etc/rc.d/savecore +++ b/etc/rc.d/savecore @@ -16,12 +16,6 @@ start_cmd="savecore_start" start_precmd="savecore_prestart" stop_cmd=":" -case ${OSTYPE} in -NetBSD) - rcvar=$name - ;; -esac - savecore_prestart() { # ${DUMPDIR} should be a directory or a symbolic link @@ -29,38 +23,28 @@ savecore_prestart() # DUMPDIR="${dumpdir:-/var/crash}" - case ${OSTYPE} in - FreeBSD) - # Quit if we have no dump device - case ${dumpdev} in - [Nn][Oo] | '') - debug 'No dump device. Quitting.' - return 1 - ;; - esac - - # If there is no crash directory set it now - case ${dumpdir} in - '') - dumpdir='/var/crash' - ;; - [Nn][Oo]) - dumpdir='NO' - ;; - esac + # Quit if we have no dump device + case ${dumpdev} in + [Nn][Oo] | '') + debug 'No dump device. Quitting.' + return 1 + ;; + esac - if [ ! -e "${dumpdev}" -o ! -d "${dumpdir}" ]; then - warn "Wrong dump device or directory. Savecore not run." - return 1 - fi + # If there is no crash directory set it now + case ${dumpdir} in + '') + dumpdir='/var/crash' ;; - NetBSD) - if [ ! -d "${dumpdir}" ]; then - warn "No /var/crash directory; savecore not run." - return 1 - fi + [Nn][Oo]) + dumpdir='NO' ;; esac + + if [ ! -e "${dumpdev}" -o ! -d "${dumpdir}" ]; then + warn "Wrong dump device or directory. Savecore not run." + return 1 + fi return 0 } |