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}