From: "Ronald Warner" <[EMAIL PROTECTED]>

> i have created a script that checks other servers and depending on whether
> they are up, it would change the default gw.  anyway, i am planning on
> adding this to crond.  when it ran, it said:
> /root/scripts/gwchk: [: =: unary operator expected
> /root/scripts/gwchk: [: =: unary operator expected

> in /etc/rc.d/rc.local, i have set the following GW=gateway1.  in the
script,
> i have a "if [ $GW = 'gateway1' ]; then"  it seems that the variable i
have
> set at startup does not seem to get carried "globally."  anyone know how i
> can set a variable up for global use?

Have you tried exporting the variables?
ex: export GW="gateway1" and calling that variable like $GW


HTH,
glynn


> thanks.
>
>
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
> _
> Philippine Linux Users Group. Web site and archives at
http://plug.linux.org.ph
> To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
>
> Fully Searchable Archives With Friendly Web Interface at
http://marc.free.net.ph
>
> To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]
>

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to