1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Improve the error handling for the new get_pidfile_from_conf()

This commit is contained in:
Doug Barton 2011-04-23 05:24:17 +00:00
parent 8028832653
commit b1850238b7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220963

View File

@ -399,12 +399,16 @@ wait_for_pids()
#
get_pidfile_from_conf()
{
if [ -z "$1" -o -z "$2" ]; then
err 3 "USAGE: get_pidfile_from_conf string file ($name)"
fi
local string file line
string="$1" ; file="$2"
if [ -z "$string" -o -z "$file" ] || [ ! -s "$file" ]; then
err 3 'USAGE: get_pidfile_from_conf string file'
if [ ! -s "$file" ]; then
err 3 "get_pidfile_from_conf: $file does not exist ($name)"
fi
while read line; do