From owner-freebsd-questions@FreeBSD.ORG Thu Oct 31 08:47:54 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 170BEDAF for ; Thu, 31 Oct 2013 08:47:54 +0000 (UTC) (envelope-from talayeh.asadi@gmail.com) Received: from mail-ie0-x233.google.com (mail-ie0-x233.google.com [IPv6:2607:f8b0:4001:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA5D52A63 for ; Thu, 31 Oct 2013 08:47:53 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id aq17so4530294iec.10 for ; Thu, 31 Oct 2013 01:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=DP7pKVVtytN8N/dh0UZ4jAc9/zqCq6+xtCvKrcjY1U0=; b=FlenFK1o0TJEWx2WC1Fz3/OgpXUbFGs+Sy2zQPch1Oz75OdBx5ZfShASLeNP2avS6P 6molqH3dDAQ/HHgGc81jVlbKvrVgc7XUdbrQ2FIWV+RSM9L3aSNfci5pOhc9qJ07Iwl0 yGGTvAx37otj2RQ8+CpA//0oGWUv1UHuzcQvJu+UemZWSdOvOQi0akx9psjbmbnqv7FU jnrKd3GDAGC/QUxlS5JR1dBCdUBc5hpF4lIIycr0l8jJkJVC69h48Oomja6x2FtcZeJh vIXJn3pXRDfMbYMwywaIM0pMXN3/id6ebXYroyf8K+BrspcmVQ5qABD3ihdoxPzQQ6TG E4Sg== X-Received: by 10.50.1.102 with SMTP id 6mr5996588igl.0.1383209273107; Thu, 31 Oct 2013 01:47:53 -0700 (PDT) MIME-Version: 1.0 Sender: talayeh.asadi@gmail.com Received: by 10.42.8.70 with HTTP; Thu, 31 Oct 2013 01:47:33 -0700 (PDT) In-Reply-To: <20131031092922.bd60f4bd.freebsd@edvax.de> References: <20131031092922.bd60f4bd.freebsd@edvax.de> From: takCoder Date: Thu, 31 Oct 2013 12:17:33 +0330 X-Google-Sender-Auth: -USA_G2mIRYk1aLiZwloB9xggl8 Message-ID: Subject: Re: rcorder issue To: Polytropon , FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: tak.official@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 08:47:54 -0000 Thank you for your quick and complete reply :) On Thu, Oct 31, 2013 at 11:59 AM, Polytropon wrote: > On Thu, 31 Oct 2013 11:42:41 +0330, takCoder wrote: > > Hi all, > > > > My question is: May it cause a problem, for rcorder or else, to have a > > sub-folder in rc.d/ path ? > > First, the things you are refering to are directories and > subdirectories. "Folder" is technically wrong. The correct > term is directory. A "folder" is the name of a visual > representation (usually an icon) that represents a directory > within a GUI concept. The relations that reflect that > difference are "is a" vs. "represents a". :-) > Excuse me for that miss-use of "folder" term, and thanks for your clarification. I'll try to keep that in mind ;) > > > I've faced a doubt around this rcorder process.. I think i have heard > that > > we should not have sub-folders in "rc.d"s' as it may cause rcorder a > > problem.. this one is apart from the fact that rc.d should only contain > > shells which are to be run automatically on startup.. > > That's correct. From /etc/rc, you can see: > > files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null` > > It's about _files_, so * will usually be resolved by the > shell to any entry found in the specified directory. In > case that a subdirectory is found, any future operation > will be done on _that subdirectory_ instead of a file > (that is maybe contained in that subdirectory). That's > why it's suggested to put the rc.d scripts without any > "deeper nesting" into /etc/rc.d and /usr/local/etc/rc.d > respectively. Similarly, non-OS scripts are processed > from the /usr/local/etc/rc.d directory (and other directories > the user might have added). > Yes I guess that's the point! It is then where rc do not expect a directory in rc.d and things happen.. > > But now I can't be sure about it as i can't remember it clearly or find > > it.. One of my mates created a sub-folder in his system's rc.d folder, so > > he can run his preferred scripts there in his required order, using > > /etc/rc. > > It would also be possible to add a custom /opt/rc.d > directory and add this to the local_startup vairable > in /etc/rc.conf, for example: > > local_startup="/usr/local/etc/rc.d /opt/rc.d" > > This will cause additional directories to be sourced. > Note that I'm an optimist and therefore often (ab)use > the Solaris-ism (Solarism?) of /opt. :-) > Just keep being an optimist! That's what's right .. :) > > Of course, it would also be valid to do something like > this (even though I haven't tested that specific case): > > local_startup="/usr/local/etc/rc.d /usr/local/etc/rc.d/bob" > > In this example, /usr/local/etc/rc.d/bob contains further > rc.d-style scripts. > > > Thank you all in advance, for any tips you may offer on this. :) > > Use the correct terminology for all the things. ;-) Again, Thank you for your explanations. And I'll try to keep that in mind ;) Best Regards, takCoder