From owner-freebsd-rc@FreeBSD.ORG Sun May 20 00:11:30 2007 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 792B616A41F for ; Sun, 20 May 2007 00:11:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx24.fluidhosting.com [204.14.89.7]) by mx1.freebsd.org (Postfix) with SMTP id 3358A13C44B for ; Sun, 20 May 2007 00:11:29 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 6094 invoked by uid 399); 19 May 2007 23:44:47 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 19 May 2007 23:44:47 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <464F8BEE.6040105@FreeBSD.org> Date: Sat, 19 May 2007 16:44:46 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0b2 (X11/20070116) MIME-Version: 1.0 To: freebsd-rc@freebsd.org Content-Type: multipart/mixed; boundary="------------030605090508050807090606" Subject: [Fwd: Re: X.org 7.2 ports merged into the FreeBSD Ports Tree] X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2007 00:11:30 -0000 This is a multi-part message in MIME format. --------------030605090508050807090606 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 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 --------------030605090508050807090606 Content-Type: text/plain; name="rc.subr-nodupes.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rc.subr-nodupes.diff" 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 --------------030605090508050807090606--