Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/service Only match first instance of name and rcvar...
details: https://anonhg.NetBSD.org/src/rev/17c757f55254
branches: trunk
changeset: 354135:17c757f55254
user: sborrill <sborrill%NetBSD.org@localhost>
date: Mon Jun 05 09:20:05 2017 +0000
description:
Only match first instance of name and rcvar in file.
diffstat:
usr.sbin/service/service | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 18b06e161e26 -r 17c757f55254 usr.sbin/service/service
--- a/usr.sbin/service/service Mon Jun 05 09:09:13 2017 +0000
+++ b/usr.sbin/service/service Mon Jun 05 09:20:05 2017 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: service,v 1.7 2015/04/05 11:33:15 apb Exp $
+# $NetBSD: service,v 1.8 2017/06/05 09:20:05 sborrill Exp $
# service -- run or list system services
#
# Taken from FreeBSD: releng/10.1/usr.sbin/service/service.sh 268098
@@ -84,8 +84,8 @@
_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}
Home |
Main Index |
Thread Index |
Old Index