X.org 7.2 ports merged into the FreeBSD Ports Tree

Doug Barton dougb at FreeBSD.org
Sat May 19 23:39:29 UTC 2007


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

-------------- next part --------------
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


More information about the freebsd-ports mailing list