From fd2f5ff8601ec0e565e7ca8223300bced1096f50 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 6 Jun 2017 09:20:14 +0000 Subject: [PATCH] Pull up following revision(s) (requested by sborrill in ticket #9): usr.sbin/service/service: revision 1.8 Only match first instance of name and rcvar in file. --- usr.sbin/service/service | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/service/service b/usr.sbin/service/service index bf5310a71756..3219ae4c63b0 100644 --- a/usr.sbin/service/service +++ b/usr.sbin/service/service @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: service,v 1.7 2015/04/05 11:33:15 apb Exp $ +# $NetBSD: service,v 1.7.10.1 2017/06/06 09:20:14 martin Exp $ # service -- run or list system services # # Taken from FreeBSD: releng/10.1/usr.sbin/service/service.sh 268098 @@ -84,8 +84,8 @@ if [ -n "${ENABLED}" ]; then _rc_files | $flt | while read file do if grep -q ^rcvar "$file"; then - eval $( grep ^name= "$file" ) - eval $( grep ^rcvar "$file" ) + eval $( grep -m 1 ^name= "$file" ) + eval $( grep -m 1 ^rcvar "$file" ) if [ -n "${rcvar}" ]; then load_rc_config ${rcvar} checkyesno ${rcvar} 2>/dev/null && echo ${file}