Re: [gentoo-user] [SOLVED] gentoo and proxy variable
Uwe Thiem wrote: > On 25 December 2006 21:18, Etaoin Shrdlu wrote: > >> On Monday 25 December 2006 19:19, Uwe Thiem wrote: >> >>> So make the cronjob itself a shell script and set the variable in that >>> script! >>> >> Yes, that's what I said two posts above :-) >> > > Only, I sent mine 4 hours before you. At times, it takes quite a while until > my message show up. ;-) > > Uwe > > Yep. Just as I suspected. This explains why your and Etaoin's replies mostly cover each other. From my point of view your messages came after Etaoin's. It happens. ;-) -- Best regards, Daniel -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] [SOLVED] gentoo and proxy variable
On 25 December 2006 21:18, Etaoin Shrdlu wrote: > On Monday 25 December 2006 19:19, Uwe Thiem wrote: > > So make the cronjob itself a shell script and set the variable in that > > script! > > Yes, that's what I said two posts above :-) Only, I sent mine 4 hours before you. At times, it takes quite a while until my message show up. ;-) Uwe -- A fast and easy generator of fractals for KDE: http://www.SysEx.com.na/iwy-1.0.tar.bz2 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] [SOLVED] gentoo and proxy variable
On Monday 25 December 2006 19:19, Uwe Thiem wrote: > So make the cronjob itself a shell script and set the variable in that > script! Yes, that's what I said two posts above :-) -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] [SOLVED] gentoo and proxy variable
Etaoin Shrdlu wrote: > On Monday 25 December 2006 15:02, Daniel Iliev wrote: > > >> grep -in proxy /etc/make.conf.example >> 144:# If you need to set a proxy for wget or lukemftp, add the >> appropriate "export >> 145:# ftp_proxy=" and "export http_proxy=" lines to >> /etc/profile if >> >> >> So it appears "/etc/profile" is the appropriate file. >> > > I'm not sure that a cron job can see the variables set by /etc/profile. > IIRC, even PATH is unavailable to cron jobs. Only a few predefined > variables are set ($HOME, $SHELL and a few others which I don't recall > now). > It sounds logical and I think the vars available to cron are in /etc/crontab. There remains the other solution - to set the vars from the same script which runs wget. ;-) Thank you very much! -- Best regards, Daniel -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] [SOLVED] gentoo and proxy variable
On 25 December 2006 20:31, Etaoin Shrdlu wrote: > On Monday 25 December 2006 15:02, Daniel Iliev wrote: > > grep -in proxy /etc/make.conf.example > > 144:# If you need to set a proxy for wget or lukemftp, add the > > appropriate "export > > 145:# ftp_proxy=" and "export http_proxy=" lines to > > /etc/profile if > > > > > > So it appears "/etc/profile" is the appropriate file. > > I'm not sure that a cron job can see the variables set by /etc/profile. > IIRC, even PATH is unavailable to cron jobs. Only a few predefined > variables are set ($HOME, $SHELL and a few others which I don't recall > now). So make the cronjob itself a shell script and set the variable in that script! Uwe -- A fast and easy generator of fractals for KDE: http://www.SysEx.com.na/iwy-1.0.tar.bz2 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] [SOLVED] gentoo and proxy variable
On Monday 25 December 2006 15:02, Daniel Iliev wrote: > grep -in proxy /etc/make.conf.example > 144:# If you need to set a proxy for wget or lukemftp, add the > appropriate "export > 145:# ftp_proxy=" and "export http_proxy=" lines to > /etc/profile if > > > So it appears "/etc/profile" is the appropriate file. I'm not sure that a cron job can see the variables set by /etc/profile. IIRC, even PATH is unavailable to cron jobs. Only a few predefined variables are set ($HOME, $SHELL and a few others which I don't recall now). -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] [SOLVED] gentoo and proxy variable
Daniel Iliev wrote: > Mike Williams wrote: > >> On Monday 25 December 2006 12:24, Daniel Iliev wrote: >> >> >>> Where is it most appropriate to set ftp_proxy and http_proxy environment >>> variables on Gentoo in order to use a proxy server with wget *when it is >>> used by emerge from a cron job*? >>> >>> I want to make an "emerge --fetchonly" cron job which downloads through >>> a squid server. Actually the ftp_proxy variable is important in this >>> case because the whole traffic on port 80 is transparently redirected to >>> the proxy. >>> >>> >> /etc/make.conf >> It's sourced as a bash script. >> >> >> > > Thanks a lot! > > That will do the job for emerge. What if I want to schedule some other > downloading with cron? > > grep -in proxy /etc/make.conf.example 144:# If you need to set a proxy for wget or lukemftp, add the appropriate "export 145:# ftp_proxy=" and "export http_proxy=" lines to /etc/profile if So it appears "/etc/profile" is the appropriate file. -- Best regards, Daniel -- gentoo-user@gentoo.org mailing list