Hi.

I use my laptop at home and at school. But the school use a proxyserver so I have to set it up the first time I use mozilla and each time I open a terminal window.

I figured this could be automated because the DNS is detected at startup and saved in /etc/resolv.conf.

So I tried writing a script something like this:

--------------------
#!bin/bash
DNS=grep -a stud /etc/resolv #If at school the string is 'search stud.but.auc.dk'

DNS_WITH_PROXY="search stud.but.auc.dk" #the DNS which requires a proxy

if [&DNS == &DNS_WITH_PROXY];
then export http_proxy #sets the proxyserver.
fi
---------------------


Well.. my problem is the condition in the if/then. How can I compare two values of variables and if equal -> then...?

Sorry.. I don't yet understand the way the script language works. I've looked in the tutorials without luck. Hope someone can help me out. Maybe even an easier way to solve the problem;-)