[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: IPmasq from 2.0 to slink, and what about aliases..?



Dariush Pietrzak wrote:
> 
>  Another thing is that new ipmasq uses enumerate-interfaces or sth...
> causing messages in logs saying sth about non-existent eth0_1 interface
> instead of eth0:0

The my solution is to create a A04functions.rul rule in the following
manner:

function ipnm_cache () {
    #= GB@Nauta.it i=`echo $1 | sed -e 's/\:/_/'`
    local i=`echo $1 | sed -e 's/\:/_/'`
    eval "IPOFIF=\$IPOFIF_$i"
    eval "NMOFIF=\$NMOFIF_$i"
    return
}

and the a A01interfaces.rul rule:

#=GB@Nauta.it EXTERNAL=`default-if`
EXTERNAL=`default-if | sort | uniq`
INTERNAL=`enumerate-if | grep -v lo`
if [ -n "$EXTERNAL" ]; then
    for i in $EXTERNAL; do
        INTERNAL=`echo $INTERNAL | sed -e s/$i//`
    done
fi
if [ -n "$EXTERNAL" -o -n "$INTERNAL" ]; then
    for i in $EXTERNAL $INTERNAL; do
        #- GB@Nauta.it i=`echo $i | sed -e 's/\:/_/'`
        ip=`ipofif $i`
        nm=`nmofif $i`
        #+ GB@Nauta.it
        i=`echo $i | sed -e 's/\:/_/'`
        eval "IPOFIF_$i=$ip"
        eval "NMOFIF_$i=$nm"
    done
fi

                                        Ciao, Guido.
-- 
+----------------+---------------------------------------+
| Guido Bozzetto | Office ph./fax:+39 0432 477588/548314 | L'avar al è
chel
|   \/     I     | E-mail:    :-)     mailto:GB@Nauta.it | che si
lambiche
|   OO     like  | Web:   http://www.nauta.it/~bozzetto/ | a vivi puar
|   --     Linux | Talk:                gb@argo.nauta.it | par muri sior
+----------------+---------------------------------------+


Reply to: