Quoting Paolo Pedaletti ([EMAIL PROTECTED]): > Ciao, > someone can explain the difference between run-parts and: > -8<----------- -8<----------- > > I prefer a script rather then a binary file, if they can do the same > things... > > The reason of this is that if I don't want execute a script-file during the > cron time (daily/weekly/montly) I simply do: > chmod -x script-file > but cron (using run-parts) tell me: > > /etc/cron.daily/leafnode: > run-parts: failed to exec /etc/cron.daily/leafnode: Permission denied > run-parts: /etc/cron.daily/leafnode exited with return code 1 [snip] > Right! Because all this scripts are no more executable, but still exist in > that directory: > > /etc/cron.daily# dir > -rwxr-xr-x 1 root root 277 mag 14 1998 0anacron* > -rwxr-xr-x 1 root root 2307 ago 14 14:20 apache* > -rwxr-xr-x 1 root root 449 gen 13 00:09 calendar* > -rw-r--r-- 1 root root 421 dic 18 21:56 leafnode [snip] > Do I wrong something/somewhere?
>From man run-parts: 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. So either create a subdirectory called, say, suspended and move them there, or type mv -i leafnode leafnode.suspended and run-parts will ignore them. Cheers, -- Email: [EMAIL PROTECTED] Tel: +44 1908 653 739 Fax: +44 1908 655 151 Snail: David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA Disclaimer: These addresses are only for reaching me, and do not signify official stationery. Views expressed here are either my own or plagiarised.