Jim many thanks for the suggestions that has really clarified what I need to do nicely
I have had a bit of a change around to include your suggestions, I've decided to create a new script in /usr/local/sbin to do the apt-update & upgrade bizzo (which is better in keeping with my previously set-up scripts etc. and invoke it with a simplified script in /etc/cron.daily version 1- is runnng better already many thanks On Mon, 21 Feb 2005 15:22, Jim Cheetham wrote: > > On line 11 I presume is the initial definition of MYSCRIPT. You must not > have the space after the = sign. > > Also, you should not include the command-line options at this point, > because that messes up the test ([ !-x) and possibly the invocation. The > shell understands the idea of "a single thing" having spaces in it, it > you use it in quote marks. > > So you could say > > MYPROG=/usr/bin/apt-get > MYARGS="-d upgrade -y" > ... > if [ ! -x $MYPROG ] ... > ... > $MYPROG $MYARGS > > However, here's a thought - you want to run this from cron, I guess. You > don't need to check for the existance of sendmail, it's a prerequisite > for cron anyway, and you don't need to invoke a script, because you're > actually only asking for one thing anyway. > > Plus you probably need to run apt-get update first anyway ... > > So, try this cron command ... > > (whatever time specification you want) /usr/bin/apt-get -qq update && > /usr/bin/apt-get upgrade --download --simulate > > (I use the full-name commands in scripts, so I don't have to go to the > man page when I forget what '-s' means! ) > > -jim -- cheers................dave Mail to: "[EMAIL PROTECTED]" ____________________________________________ KMail 1.7.2 & Kontact - KDE Desktop 3.3.2 SimplyMEPIS Linux - Kernel 2.6.7 (i686) ____________________________________________
