diff options
author | des <des@FreeBSD.org> | 2004-10-24 13:04:09 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-10-24 13:04:09 +0000 |
commit | e84d8e229d7714091f989408c13bc3ab3d66dba5 (patch) | |
tree | 51f1454ac2930e445bdfcf0187b7b32e6d545eee /etc | |
parent | feac68dce960ac497df4a185a6967f4a8b37ae7e (diff) | |
download | FreeBSD-src-e84d8e229d7714091f989408c13bc3ab3d66dba5.zip FreeBSD-src-e84d8e229d7714091f989408c13bc3ab3d66dba5.tar.gz |
- use `realpath /dev/dumpdev` instead of just /dev/dumpdev so messages
will show the real device name
- show different error messages for missing dump device and directory
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.d/savecore | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/rc.d/savecore b/etc/rc.d/savecore index ed6b458..6e3d698 100755 --- a/etc/rc.d/savecore +++ b/etc/rc.d/savecore @@ -30,7 +30,7 @@ savecore_prestart() return 1 ;; [Aa][Uu][Tt][Oo]) - dumpdev=/dev/dumpdev + dumpdev=`/bin/realpath /dev/dumpdev` ;; esac @@ -44,8 +44,13 @@ savecore_prestart() ;; esac - if [ ! -e "${dumpdev}" -o ! -d "${dumpdir}" ]; then - warn "Wrong dump device or directory. Savecore not run." + if [ ! -c "${dumpdev}" ]; then + warn "Dump device does not exist. Savecore not run." + return 1 + fi + + if [ ! -d "${dumpdir}" ]; then + warn "Dump directory does not exist. Savecore not run." return 1 fi return 0 |