mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +00:00
- 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
This commit is contained in:
parent
c751e6f0fa
commit
82a21971a6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136901
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user