Create a new system variable
Matthew Benjamin
msbenjamin at fedex.com
Thu Apr 8 19:45:17 UTC 2004
I really appreciate the GOOD suggestions I tried it however it still
does not work. Do you think it's a bug in Fedora Core 1? I tried Keven
and Martin's suggestions also to no avail. All of these work from just a
command line but once in the cron it flakes out.
-----Original Message-----
From: duncan brown [mailto:duncanbrown at atom.csionline.net]
Sent: Thursday, April 08, 2004 12:20 PM
To: fedora-list at redhat.com
Subject: Re: Create a new system variable
matt,
you want to create a wrapper script, OR have the export of your
http_proxy var on your crontab line seperated from your command by an ;
or &&
; means that it'll run the following command whether or not the first
one succeeded && means that it'll only run it if the previous command
completed successfully
if this is for apt (apt-get / apt-cache), then you can modify the
apt.conf file (do a search for the word proxy) and you can set it up in
there and be set.
now, you could also create a wrapper script
create /usr/local/bin/my_wrapper (or whatever you want to call it)
here are the contents
-cut --------------
#!/bin/bash
export http_proxy='http://www.myproxy.com:80/'
the command
-cut --------------
now, run this
chmod +x /usr/local/bin/my_wrapper
this makes the script executable.
now add /usr/local/bin/my_wrapper to your crontab.
-d
Matthew Benjamin said:
> Can someone tell me how to create a system variable. For instance I
> would like to create a variable called http_proxy that will be
> available for a cronjob. This requires the variable to be available to
> the process when no one is logged in. Export does not work because it
> disappears when you log off. editing the /etc/profile file to include
> this does not work because the variable is created as an environment
> variable and only exits while you're logged on. That's my dilemma.
> Please help.
>
> mattB.
-+(duncan brown
-+(duncanbrown at linuxadvocate.net
-+(http://www.linuxadvocate.net
Blessed is the man who, having nothing to say, abstains from giving
wordy evidence of the fact.
-- George Eliot
--
fedora-list mailing list
fedora-list at redhat.com
To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
More information about the fedora-list
mailing list