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 _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"