]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/initscripts/init.d/networking/red
red: change mac address of nas0 device.
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / networking / red
index b33c03f136f67168490f6001c42f82256338dca0..b09737e39526a8e041fe975818283873f97ee777 100644 (file)
@@ -175,6 +175,14 @@ case "${1}" in
                                boot_mesg "Createing ATM-Bridge as $PPP_NIC ..."
                                br2684ctl -c0 -e${ENCAP} -a0.${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 nas0 address ${MAC}
+                               else
+                                       ip link set dev nas0 address $(cat /sys/class/net/green0/address)
+                               fi
+
                                if [ "$TYPE" == "pppoeatm" ]; then
                                        TYPE="pppoe"
                                fi
@@ -389,7 +397,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}"