Re: Bug#94286: apt: should ignore .dpkg-new and the like in apt.conf.d
On Wed, Apr 18, 2001 at 09:41:29PM -0600, Jason Gunthorpe wrote:
> On Wed, 18 Apr 2001, Matt Zimmerman wrote:
>
> > My comment, which was unrelated to the patch, was that a better approach
> > might be to accept filenames matching a pattern, rather than excluding
>
> This is what all debian tools that use .d dirs do. I stole the exclude
> list from cron IIRC.
Which cron did you steal it from? Surely not Debian's cron. For
/etc/cron.daily, /etc/cron.weekly and /etc/cron.monthly, it uses run-parts.
For /etc/cron.d, it emulates the filename selection of run-parts:
CRON(8):
[...]
a crontab file to /etc/cron.d. Such files should be named
after the package that supplies them. Files must conform
to the same naming convention as used by run-parts(8):
they must consist solely of upper- and lower-case letters,
digits, underscores, and hyphens. Like /etc/crontab, the
[...]
RUN-PARTS(8):
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, under
scores, and hyphens. Subdirectories of directory and
files with other names will be silently ignored.
ifupdown and ppp also use run-parts. xfree86-common emulates its filename
selection:
# run-parts-style sourcing of every file in the session directory;
# source instead of executing so that the variables defined above are
# available to the scripts, and so that they can pass variables to each
# other
for sessionfile in $syssessiondir/*; do
if [ -f $sessionfile ]; then
if expr $sessionfile : '.*/[0-9][0-9][[:alnum:]_-]*$' > /dev/null 2>&1; then
. $sessionfile
fi
fi
done
Let's not forget /etc/rc*.d, which predates all of these, and enforces an even
stricter interpretation of filenames. I would argue that run-parts-style
filenames are the de facto Debian standard.
--
- mdz
Reply to: