I think you meant 'echo' instead of 'cat', and 'search' instead of
> I used to have a file which contained
>
> ifconfig eth1 XXX.YYY.ZZZ.WWW netmask 255.255.255.0
> route add default gw XXX.YYY.ZZZ.1
> cat "seach <domain>" >> /etc/resolv.conf
> cat "nameserver AAA.BBB.CCC.DDD" >> resolv.conf
'seach'. Also you seem to be appending to /etc/resolv.conf everytime. If
that is the case, then the resolver is probably using some other search
path somewhere in the beginning of the file. You might want to fix your
script so that it overwrites the file instead.