Hi,
I'm not sure if this is what you want/need, but here's your script (shortened and somewhat re-written):
Code:
#!/bin/bash
# PPPOE SETUP
echo -e "Would you like to Setup the ADSL?: \c "
read ADSL
if [[ "$ADSL" == "yes" ]]
then
# yes was entered for adsl
echo -e "Default Route?: \c "
read Route
if [[ $Route == "yes" ]]
then
# yes was entered for route
cat > ifcfg-ppp0 << CFG
USERCTL=ABC
PEERDNS=ABC
CFG
cat > pap-secrets << CFG1
"andrew@andrew.co.za" "*" andrew "*"
####### redhat-config-network will overwrite this part!!! (end) ############
CFG1
else
# no was entered for route
cat > ifcfg-ppp0 << CFG2
USERCTL=XYZ
PEERDNS=XYZ
CFG2
cat > pap-secrets << CFG3
"andrew@andrew.co.za" "*" andrew "*"
####### redhat-config-network will overwrite this part!!! (end) ############
CFG3
fi
# no was eneterd for adsl
fi
Hope this clears things up a bit.