Jorge Redondo wrote... > I think I've found a bug in run-parts and this bug affecs also the cron > package. > > The man page of run-parts says: > " If the --lsbsysinit option is given, then the names must not end in > .dpkg-old or .dpkg-dist or .dpkg-new or .dpkg-tmp, and must belong to > one or more of the following namespaces: the LANANA-assigned namespace > (^[a-z0-9]+$); the LSB hierarchical and reserved namespaces > (^_?([a-z0-9_.]+-)+[a-z0-9]+$); and the Debian cron script namespace > (^[a-zA-Z0-9_-]+$) > " > > So, if I run run-parts with --lsbsysinit option, it should select files with > filename like "test_file" > because this file belongs to the Debian cron script namespace. But it doesn't > select it.
Indeed, since in the sources the regular expression for the "cron script
namespace"
lacks the "_":
Fix is fairly simple then:
--- a/run-parts.c
+++ b/run-parts.c
@@ -600,7 +600,7 @@ regex_compile_pattern (void)
REG_EXTENDED | REG_NOSUB)) != 0)
pt_regex = &excsre;
- else if ( (err = regcomp(&tradre, "^[a-z0-9][a-z0-9-]*$", REG_NOSUB))
+ else if ( (err = regcomp(&tradre, "^[a-z0-9][a-z0-9_-]*$", REG_NOSUB))
!= 0)
pt_regex = &tradre;
However, as I have no specification of "cron script namespace", it might
be as well an error in the documentation.
Please fix in either way. Also I'm a bit sad this didn't make it into
jessie back then - I had silent failures since I relied on the
documented behaviour.
Christoph
signature.asc
Description: Digital signature

