Date: Fri, 15 Jan 2016 20:59:57 +0000 (UTC) From: Allan Jude <allanjude@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294100 - stable/10/usr.sbin/service Message-ID: <201601152059.u0FKxvBU072775@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: allanjude Date: Fri Jan 15 20:59:57 2016 New Revision: 294100 URL: https://svnweb.freebsd.org/changeset/base/294100 Log: MFC: r287581 Add an additional check to service(8) -e incase rcvar is blank Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/service/service.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/service/service.sh ============================================================================== --- stable/10/usr.sbin/service/service.sh Fri Jan 15 20:55:44 2016 (r294099) +++ stable/10/usr.sbin/service/service.sh Fri Jan 15 20:59:57 2016 (r294100) @@ -71,7 +71,9 @@ if [ -n "$RESTART" ]; then if grep -q ^rcvar $file; then eval `grep ^name= $file` eval `grep ^rcvar $file` - load_rc_config_var ${name} ${rcvar} + if [ -n "$rcvar" ]; then + load_rc_config_var ${name} ${rcvar} + fi checkyesno $rcvar 2>/dev/null && run_rc_script ${file} stop fi done @@ -101,7 +103,9 @@ if [ -n "$ENABLED" ]; then if grep -q ^rcvar $file; then eval `grep ^name= $file` eval `grep ^rcvar $file` - load_rc_config_var ${name} ${rcvar} + if [ -n "$rcvar" ]; then + load_rc_config_var ${name} ${rcvar} + fi checkyesno $rcvar 2>/dev/null && echo $file fi done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601152059.u0FKxvBU072775>