Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2013 12:17:33 +0330
From:      takCoder <tak.official@gmail.com>
To:        Polytropon <freebsd@edvax.de>, FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: rcorder issue
Message-ID:  <CAPkyVLyOo=9rJSO6gxo34tt3RKCtc6=B%2BCRqBPEHX0Y9QoXP_A@mail.gmail.com>
In-Reply-To: <20131031092922.bd60f4bd.freebsd@edvax.de>
References:  <CAPkyVLzPxTogxNceRu3Ow3Vv=n%2BFZzG7ZdX738qz08zr-a2uFA@mail.gmail.com> <20131031092922.bd60f4bd.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Thank you for your quick and complete reply :)

On Thu, Oct 31, 2013 at 11:59 AM, Polytropon <freebsd@edvax.de> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPkyVLyOo=9rJSO6gxo34tt3RKCtc6=B%2BCRqBPEHX0Y9QoXP_A>