Date: Sat, 23 Apr 2011 05:24:18 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r220963 - head/etc Message-ID: <201104230524.p3N5OIVh073168@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Sat Apr 23 05:24:17 2011 New Revision: 220963 URL: http://svn.freebsd.org/changeset/base/220963 Log: Improve the error handling for the new get_pidfile_from_conf() Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Apr 23 04:26:31 2011 (r220962) +++ head/etc/rc.subr Sat Apr 23 05:24:17 2011 (r220963) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104230524.p3N5OIVh073168>