LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   run-parts not reading all possible scripts (http://www.linuxquestions.org/questions/debian-26/run-parts-not-reading-all-possible-scripts-397151/)

merana 12-28-2005 07:12 AM

run-parts not reading all possible scripts
 
Hi All,

I've got a couple of weird occurances I'd like some suggestions on.

I'm adding some scripts for daily backups into /etc/cron.daily. On our older testing box, run-parts would follow sym-links so all I had to do was link the file into cron.daily and it ran fine. On the new box (stable with testing pinned) it wouldn't follow the symlink so I decided to just check it out directly from svn into the cron.daily directory.

So now I have the actual script in the cron.daily directory. I do a run-parts --test and the files don't show up...

I checked the versions on the run-parts between the older box and the newer box and they are as follows:

Older:
Debian run-parts program, version 2.13.2
Copyright (C) 1994 Ian Jackson, Copyright (C) 1996 Jeff Noxon.
Copyright (C) 1996,1997,1998,1999 Guy Maor
Copyright (C) 2002, 2003, 2004, 2005 Clint Adams
This is free software; see the GNU General Public License version 2
or later for copying conditions. There is NO warranty.

Newer:
Debian run-parts program, version 2.15.2
Copyright (C) 1994 Ian Jackson, Copyright (C) 1996 Jeff Noxon.
Copyright (C) 1996,1997,1998,1999 Guy Maor
Copyright (C) 2002, 2003, 2004, 2005 Clint Adams
This is free software; see the GNU General Public License version 2
or later for copying conditions. There is NO warranty.

The /etc/cron.daily directory on the new box ls' like this:

Code:

total 64K
-rwxr-xr-x  1 root root 1.9K 2005-12-28 06:57 backupRTDB.sh
-rwxr-xr-x  1 root root 2.0K 2005-12-28 07:00 backupTWDB.sh
-rwxr-xr-x  1 root root 1.8K 2005-12-28 07:02 backupTWsite.sh
-rwxr-xr-x  1 root root  502 2004-11-01 14:29 bsdmainutils
-rwxr-xr-x  1 root root  814 2005-05-27 04:10 exim4-base
-rwxr-xr-x  1 root root  419 2005-03-20 04:48 find
-rwxr-xr-x  1 root root  89 2005-05-25 05:49 logrotate
-rwxr-xr-x  1 root root  946 2005-01-05 11:30 man-db
-rwxr-xr-x  1 root root  86 2004-12-19 05:40 modutils
-rwxr-xr-x  1 root root 1.3K 2005-11-21 19:42 mysql-server
-rwxr-xr-x  1 root root  495 2004-10-24 12:28 netkit-inetd
-rwxr-xr-x  1 root root 1.1K 2005-08-26 06:30 ntp-server
-rw-r--r--  1 root root  102 2004-07-28 16:44 .placeholder
-rwxr-xr-x  1 root root 2.6K 2004-07-28 16:44 standard
drwxr-xr-x  7 root root 4.0K 2005-12-28 07:02 .svn
-rwxr-xr-x  1 root root 1.3K 2005-05-25 14:21 sysklogd

When I do the run-parts --test I get this:

Code:

# run-parts --test /etc/cron.daily
/etc/cron.daily/bsdmainutils
/etc/cron.daily/exim4-base
/etc/cron.daily/find
/etc/cron.daily/logrotate
/etc/cron.daily/man-db
/etc/cron.daily/modutils
/etc/cron.daily/mysql-server
/etc/cron.daily/netkit-inetd
/etc/cron.daily/ntp-server
/etc/cron.daily/standard
/etc/cron.daily/sysklogd

What am I missing here?

Suggestions and pointers greatly appreciated.

Artanicus 12-28-2005 08:06 AM

the only common thing I can see that tyhr misssing ones are postfixed with .sh ... it shouldnt matter, but what if you remove the extension? Might work..

merana 12-28-2005 08:12 AM

Quote:

Originally Posted by Artanicus
the only common thing I can see that tyhr misssing ones are postfixed with .sh ... it shouldnt matter, but what if you remove the extension? Might work..

Son of a gun! That was it!!! It didn't like the extension! :mad:

Damn! Thanks for the other set of eyes on that Artanicus!
:)

Artanicus 12-28-2005 08:19 AM

no problem.. Very odd a problem indeed.. I have no idea why it doesn't like the .sh extension.. Maybe theyre trying to prevent running scripts tho I cant see why they would do that..

Artanicus 12-28-2005 08:21 AM

I think this explains alot:
Quote:

Filenames that end in .dpkg-old or .dpkg-dist, or do not match naming conventions that the LSB specifies for /etc/cron.daily scripts, will be skipped. Subdirectories of directory will be silently ignored.

merana 12-28-2005 09:06 AM

Quote:

Originally Posted by Artanicus
I think this explains alot:

Kiitos Artaniucus! I'll have to see what the LSB definition is for the file names in that directory. And "onnellista uutta vuotta" in advance!

{Yes I used to work with a lot of Finns mainly from Helsinki and Turku (Masa Yards) and I even worked with some up in your area when I used to be with the larger Kvaerner Group... Must be damn cold there now...}

wbrgs,

MichaelE

Artanicus 12-28-2005 09:40 AM

Quote:

Originally Posted by merana
Kiitos Artaniucus! I'll have to see what the LSB definition is for the file names in that directory. And "onnellista uutta vuotta" in advance!

{Yes I used to work with a lot of Finns mainly from Helsinki and Turku (Masa Yards) and I even worked with some up in your area when I used to be with the larger Kvaerner Group... Must be damn cold there now...}

wbrgs,

MichaelE


hehe.. Yeah, it is.. Havn't been out in nearly a week cause its so damn cold.. Alot nicer inside with mi laptop.. (:

A happy new year to you too.. (:


All times are GMT -5. The time now is 02:32 AM.