From owner-freebsd-questions@FreeBSD.ORG Thu Oct 31 08:29:33 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C300D99D for ; Thu, 31 Oct 2013 08:29:33 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 87DC12958 for ; Thu, 31 Oct 2013 08:29:33 +0000 (UTC) Received: from r56.edvax.de (port-92-195-117-74.dynamic.qsc.de [92.195.117.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id ED094277A7; Thu, 31 Oct 2013 09:29:31 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r9V8TMPV006495; Thu, 31 Oct 2013 09:29:23 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 31 Oct 2013 09:29:22 +0100 From: Polytropon To: tak.official@gmail.com Subject: Re: rcorder issue Message-Id: <20131031092922.bd60f4bd.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 08:29:33 -0000 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". :-) > 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). > 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. :-) 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. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...