#
# install using /etc/hosts
#
UNAME="$1"
LDOMAIN="$2"
echo "the default setup is to use /etc/hosts"
echo "removing /etc/resolv.conf"
rm /etc/resolv.conf > /dev/null 2>&1

echo "setting environment variable NONAMESERVER in /etc/profile"
found=`grep NONAMESERVER /etc/profile`
if [ "${found}" = "" ]
then

ed -s /etc/profile <<DONE > /dev/null 2>&1
$
a
NONAMESERVER=1; export NONAMESERVER
.
w
q
DONE

fi

exit 0

# It is unnecessary to remove named from $RCFILE, and
# it is unnecessary to add NONAMESERVER to $RCFILE,
# because this is how the file $RCFILE is configured by default.

found=`grep named $RCFILE `
if [ "${found}" = "" ]
then
:
# add NONAMESERVER to $RCFILE
#
ed -s $RCFILE <<DONE > /dev/null 2>&1
/netstat/
i
NONAMESERVER=1; export NONAMESERVER
#
.
w
q
DONE

else

echo "removing named from startup scripts"
ed -s $RCFILE <<DONE > /dev/null 2>&1
/named/
d
i
NONAMESERVER=1; export NONAMESERVER
.
w
q
DONE

fi
