> I will look into the mangling that is done on FAI_LOGIN but I
> suspect the problem comes from the fact there is a "/" in my ISP
> login.

Okay, I have found the problemS. All the calls to grep need to be
tightened up, you never check that the string you are grepping for is
actually at the beginning of the line, so you suck in comments and
what-not!!

For instance, here:

if [ -e $PPP_OPTIONS_ADSL ] && grep -q "user" $PPP_OPTIONS_ADSL ; then
        FAI_LOGIN=`grep 'user' $PPP_OPTIONS_ADSL | sed "s/\"/_/g" |
sed "s/ /_/g" | sed "s
/\t/_/g" | sed -r "s/_+/_/g" | cut -d "_" -f2`
fi

This should be more like:

if [ -e $PPP_OPTIONS_ADSL ] && grep -q "^user" $PPP_OPTIONS_ADSL ;
then
        FAI_LOGIN=`grep '^user' $PPP_OPTIONS_ADSL | sed "s/\"/_/g" |
sed "s/ /_/g" | sed "s
/\t/_/g" | sed -r "s/_+/_/g" | cut -d "_" -f2`
fi

On my machine, simply grepping on "user" gives you two lines:

# The following two options should work fine for most DSL users.
user "xxxxxxxxx"

Also I found a line that looks rather strange (looks like faulty copy
and paste):

# Static IP
STATIC_IP="none"
if [ -e $EU_DIR/eagle-usb.conf ] && grep -q "user"
$EU_DIR/eagle-usb.conf ; then
        STATIC_IP="`grep 'STATIC_IP=' $EU_DIR/eagle-usb.conf | cut -d
'=' -f2`"
fi

Shouldn't you be grepping for "^STATIC_IP=" instead of "user"?

Regards,
Jeremy

--  
http://www.jerryweb.org/         : JerryWeb.org
http://sailcut.sourceforge.net/  : Sailcut CAD
http://mpf70.sourceforge.net/    : MPman MP-F70 support for Linux

Reply via email to