]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/initscripts/init.d/networking/red
pppsetup: add atm device selection.
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / networking / red
index b33c03f136f67168490f6001c42f82256338dca0..e0c66b6724a92d341e57fba719dadc0c78cefe5f 100644 (file)
@@ -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}"