Setting environment variables inside a bash script

rpowersau at gmail.com rpowersau at gmail.com
Sun Oct 1 23:38:26 UTC 2006


If you reboot it should be there. rc.local is run during system boot.

On 10/1/06, Antonio Oliveira <to.oliveira at gmail.com> wrote:
> Hello everyone.
>
> I am having a problem trying to set up some environment variables
> in /etc/rc.local
>
> here is my file
>
> #!/usr/bash
>
> FOO="bar"
> export FOO
>
> <EOF>
>
> If I run /etc/rc.local I get absolutely no error messages, but calling env
> doesn't show the variable 'FOO' doing echo $FOO prints nothing.
>
> If I simply type {export FOO="bar"} in the bash shell and try to echo $FOO
> the variable has the correct value.
>
> What am I doing here.
>
> I'm using Edgy testing.
>
> Cheers
> --to
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>


-- 
Regards,
Russ




More information about the ubuntu-users mailing list