further to my previous reply, i tried adding the following to my little script: ENV=~/.bashrc export ENV
then i tried ENV=/etc/bashrc export ENV but in the end adding the following which are part of /root/.bashrc: PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin ENV=/root/.bashrc USERNAME="root" export USERNAME ENV did the trick with strating the script from kdesu, i'm assuming this will work for the cron job, to be honest i thought from what i read in 'man bash' that one of the first additions would do the trick since it implies that setting ENV=~/.bashrc would also set the environment as laid out in .bashrc, i also got confused when i saw that /root/.bashrc referenced itself in setting ENV, the final little script is: #!/bin/bash PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin ENV=/root/.bashrc USERNAME="root" export USERNAME ENV PATH #this updates urpmi database urpmi.update localcooker > /dev/null 2> /dev/null there's probably some overkill in there but anyway thanks to you i seem to have got things working cheers bascule On Thursday 15 Nov 2001 1:27 am, you wrote: > You can use the dash with kdesu as well I think. Also, do some reading > "man cron" and I think you will find that cron actually uses a > particular restricted environment, hence your errors. I have got around > this in the past by putting the job in a script file that sets the > environment and which is called by cron. > > BillK > > On Thu, 20
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
