]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/initscripts/init.d/networking/red
Removed collectd restart from red (not helps against the spikes at ppp0 graph)
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / networking / red
index caa857263ddc9c3e844d7d1ca502456bcfc83d08..abb3a6aa12e2b8a387a16fa229de2b98186f6233 100644 (file)
@@ -15,6 +15,8 @@
 #
 ########################################################################
 
+
+
 . /etc/sysconfig/rc 
 . ${rc_functions}
 eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
@@ -191,7 +193,17 @@ case "${1}" in
                        [ -c "/dev/ppp" ] || mknod /dev/ppp c 108 0
                        
                        PPP_NIC=${DEVICE}
-                       
+
+                       if [ "$TYPE" == "vdsl" ]; then
+                               boot_mesg "Createing VLAN Interface ${DEVICE}.7 ..."
+                               modprobe 8021q
+                               vconfig add ${DEVICE} 7
+                               PPP_NIC=${DEVICE}.7
+                               sleep 0.2
+                               ip link set ${PPP_NIC} up
+                               TYPE="pppoe"
+                       fi
+
                        if [ "$TYPE" == "pppoeatm" ] || [ "$TYPE" == "pptpatm" ]; then
                                PPP_NIC=nas0            
                                boot_mesg "Createing ATM-Bridge as $PPP_NIC ..."
@@ -295,8 +307,10 @@ case "${1}" in
                        
                        if [ "$TYPE" == "modem" ]; then
                                PLUGOPTS=" /dev/${COMPORT} ${DTERATE} connect /etc/ppp/dialer lock modem crtscts"
+                               METHOD="PPPOE_PLUGIN"
                        elif [ "$TYPE" == "serial" ]; then
                                PLUGOPTS=" /dev/${COMPORT} ${DTERATE} connect /bin/true lock modem crtscts"
+                               METHOD="PPPOE_PLUGIN"
                        fi
                
                        ### Standard PPP options we always use
@@ -326,11 +340,12 @@ case "${1}" in
                        #
                        if [ "$TYPE" == "pptp" ]; then
                                PPPOE_CMD="pptp $PPTP_PEER --nolaunchpppd"
+                               METHOD=""
                        fi
                        
                        ### Run everything
                        #
-                       if [ "${METHOD}" == "PPPOE_PLUGIN" ]; then
+                       if [ "$METHOD" == "PPPOE_PLUGIN" ]; then
                                /usr/sbin/pppd $PPP_STD_OPTIONS $DEBUG $DEMAND >/dev/null 2>&1 &
                                evaluate_retval
                                # echo PLUGIN: /usr/sbin/pppd $PPP_STD_OPTIONS $DEBUG $DEMAND
@@ -342,7 +357,7 @@ case "${1}" in
                        ## Create & Enable vnstat
                        /usr/bin/vnstat -u -i ppp0 -r --enable --force > /dev/null 2>&1
                        /etc/rc.d/init.d/connectd start
-
+                       exit 0
                fi
                ;;
 
@@ -401,6 +416,15 @@ case "${1}" in
                fi
 
                if [ "$DEVICE" != "${GREEN_DEV}" ] && [ "$DEVICE" != "" ]; then
+                       link_status=`ip link show $DEVICE.7 2> /dev/null`
+                       if [ -n "${link_status}" ]; then
+                               if echo "${link_status}" | grep -q UP; then
+                                       boot_mesg "Bringing down the ${DEVICE}.7 interface..."
+                                       ip link set ${DEVICE}.7 down
+                                       vconfig del ${DEVICE} 7
+                                       evaluate_retval
+                               fi
+                       fi
                        link_status=`ip link show $DEVICE 2> /dev/null`
                        if [ -n "${link_status}" ]; then
                                if echo "${link_status}" | grep -q UP; then