X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=src%2Finitscripts%2Finit.d%2Fnetworking%2Fred;h=e0c66b6724a92d341e57fba719dadc0c78cefe5f;hp=b33c03f136f67168490f6001c42f82256338dca0;hb=872d5a1e33e9fb6761c06cf5e251f39470a0edd9;hpb=3e862ce4f99059002b60994addc87a013d298b38 diff --git a/src/initscripts/init.d/networking/red b/src/initscripts/init.d/networking/red index b33c03f13..e0c66b672 100644 --- a/src/initscripts/init.d/networking/red +++ b/src/initscripts/init.d/networking/red @@ -22,6 +22,7 @@ #Define some defaults INET_VLAN=7 IPTV_VLAN=8 +ATM_DEV=0 eval $(/usr/local/bin/readhash /var/ipfire/main/settings) if [ "$RRDLOG" == "" ]; then @@ -170,11 +171,19 @@ case "${1}" in if [ "$TYPE" == "pppoeatm" ] || [ "$TYPE" == "pptpatm" ]; then - PPP_NIC=nas0 - DEVICE=nas0 + PPP_NIC=nas${ATM_DEV} + DEVICE=nas${ATM_DEV} boot_mesg "Createing ATM-Bridge as $PPP_NIC ..." - br2684ctl -c0 -e${ENCAP} -a0.${VPI}.${VCI} >/dev/null 2>&1 & + br2684ctl -c${ATM_DEV} -e${ENCAP} -a${ATM_DEV}.${VPI}.${VCI} >/dev/null 2>&1 & sleep 1 + + # use user-defined or green mac address for nas0 + if [ -n "$MAC" ]; then + ip link set dev nas${ATM_DEV} address ${MAC} + else + ip link set dev nas${ATM_DEV} address $(cat /sys/class/net/green0/address) + fi + if [ "$TYPE" == "pppoeatm" ]; then TYPE="pppoe" fi @@ -389,7 +398,7 @@ case "${1}" in # PPP_STD_OPTIONS="$PLUGOPTS $DNS defaultroute noipdefault noauth" PPP_STD_OPTIONS+=" default-asyncmap hide-password nodetach" - PPP_STD_OPTIONS+=" mru ${MRU} noaccomp nodeflate nopcomp novj novjccomp" + PPP_STD_OPTIONS+=" noaccomp nodeflate nopcomp novj novjccomp" PPP_STD_OPTIONS+=" nobsdcomp user ${USERNAME} lcp-echo-interval 20" PPP_STD_OPTIONS+=" lcp-echo-failure 5 ${AUTH}"