Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 May 2007 16:44:46 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        freebsd-rc@freebsd.org
Subject:   [Fwd: Re: X.org 7.2 ports merged into the FreeBSD Ports Tree]
Message-ID:  <464F8BEE.6040105@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
FYI. If anyone has a better idea ....

-------- Original Message --------
Subject: Re: X.org 7.2 ports merged into the FreeBSD Ports Tree
Date: Sat, 19 May 2007 16:39:27 -0700
From: Doug Barton <dougb@FreeBSD.org>

Peter Jeremy wrote:

> If you upgrade to xorg 7.2 but don't cleanup the /etc files then rc.d
> and periodic scripts are processe twice.  

Here is a lightly tested patch to rc.subr that should do the trick. If
someone wants to give this a ride on a system where this issue has
been a problem, I can commit it in HEAD and let it shake out a bit.

Doug

-- 

      This .signature sanitized for your protection


[-- Attachment #2 --]
Index: rc.subr
===================================================================
RCS file: /usr/local/ncvs/src/etc/rc.subr,v
retrieving revision 1.74
diff -u -r1.74 rc.subr
--- rc.subr	10 Mar 2007 13:37:44 -0000	1.74
+++ rc.subr	19 May 2007 23:36:33 -0000
@@ -1460,14 +1460,20 @@
 }
 
 find_local_scripts_new () {
+	local dir f
+
 	local_rc=''
 	for dir in ${local_startup}; do
 		if [ -d "${dir}" ]; then
-			for file in `grep -l '^# PROVIDE:' ${dir}/* 2>/dev/null`; do
-				case "$file" in
+			for f in `grep -l '^# PROVIDE:' ${dir}/* 2>/dev/null`
+			do
+				case "$f" in
 				*.sample) ;;
-				*)	if [ -x "$file" ]; then
-						local_rc="${local_rc} ${file}"
+				*)	if [ -x "$f" ]; then
+						case "$local_rc" in
+						*[\ ]*${f}[\ ]*|*[\ ]*${f}) ;;
+						*) local_rc="${local_rc} $f" ;;
+						esac
 					fi
 					;;
 				esac


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?464F8BEE.6040105>