Craig Box's journeys, stories and notes...


Periods in run-parts

Repeat after me, Debian/Ubuntu sysadmins. You cannot use the period (.) character in /etc/foo.d directories. Can't can't can't.

Why? Well, man runparts says:

If the --lsbsysinit option is not given then the names must consist
entirely of upper and lower case letters, digits, underscores, and
hyphens.

So, you can't have files named "vhost.foo.co.nz" in your /etc/logrotate.d directory, and you can't have files named "awstats-foo.co.nz" in your /etc/cron.d directory.

As much of a big deal is made of Halloween, and as many groups of kids I saw walking the streets about 7:45, we only had one person knock on the door trick-or-treating. And we managed to successfully pretend we weren't here, sitting in the lounge watching Torchwood. (I keep waiting for the Doctor to turn up.)

Tags: , , ,

4 Responses to “Periods in run-parts”

  1. Greig says:

    Next best thing... next week is a Cybermen tie-in! 🙂

  2. Craig says:

    Hmmm, yes, well. It seemed they were looking for ways to slot "old Doctor Who" things into "new Doctor Who" episodes. This feels just like that, but more contrived. 🙂

  3. John McPherson says:

    Force of habit makes me add ".sh" or ".pl" or ".py" to the end of scripts when I write them, and cron doesn't give you any feedback about files that have been skipped (hey, it would be user-friendly to print something about skipped filenames to syslog). The cron manpage at least seems to mention it nowadays, but I'm sure when I looked into this in the past the manpage just mentioned "run-parts" in brief, so it would have to occur to you to read that manpage as well to see why your cron scripts aren't working.

    This is completely non-obvious unintuitive behaviour, even by unix command-line standards, and I think it should be changed to how the the majority of users expect it to behave. (Other distros don't have this restriction - run-parts was originally written by Debian.)

  4. Craig says:

    See 350242, 308911, 324922 and 243676 among others, I'm sure.

    "Can't change it, it'll break 10 years of old stuff". "Submit documentation patches please."

    The best answer is have it e-mail you things it silently avoided.

Leave a Reply