PATCH: fix for broken run-parts
Nathan Angelacos
nangel at nothome.org
Sat Apr 28 14:14:50 UTC 2007
Gabriel L. Somlo wrote:
> On Sat, Apr 28, 2007 at 11:33:37AM +0200, Bernhard Fischer wrote:
>> I don't like this patch. The big run-parts from debianutils have this
>> check for a reason (to ignore non-conforming files) and i think breaking
>> compatibility is not a sensible thing to do wrt. run-parts behaviour.
>> See?
>
> Yea, but how about ifupdown.c, also from Debian ? It wants to
> run-parts in, e.g., /etc/network/if-pre-up.d (notice the '.') ?
> Our current busybox incarnation of run-parts will do nothing, because
> the directory contains a dot. I really don't think containing a '.'
> should disqualify a file (or a directory) from being processed by
> run-parts.
>
> If you don't like my patch, which only adds '.' to the list of
> 'approved' characters (anywhere ) in a filename, we need to replace
> the check with more complex logic (i.e., skip only if the dot happens
> at the beginning of the filename part (e.g. /foo/bar/.blah), but not
> if it's elsewhere in the filename (e.g. /foo.bar/xyz/blah, or
> /foo/bar/blah.ext).
>
> Thoughts ?
>
According to the run-parts manpage:
>run-parts runs a number of scripts or programs found in a single
>directory directory. Filenames should consist entirely of upper and
>lower case letters, digits, underscores, and hyphens. Subdirectories of
>directory and files with other names will be silently ignored.
/foo/bar/blah.ext should not be executed. :-/
Once you accept it, it can be used to advantage... To temporarily
disable a cron script in the daily or hourly directory, simply rename it
to: "foo.disabled", and run-parts quits running it.
Please don't take that away.
More information about the busybox
mailing list