Add optional route to pptp server.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / networking / red
index 0c41663..1e4af55 100644 (file)
@@ -363,6 +363,10 @@ case "${1}" in
                                        fi
                                fi
                                ip link set ${PPP_NIC} up
+                               if [ -n "${PPTP_ROUTE}" ]; then
+                                       boot_mesg "Set route ${PPTP_ROUTE} to pptp server..."
+                                       route add ${PPTP_ROUTE}
+                               fi
                        else
                                boot_mesg "Bringing up the PPP via ${TYPE} on ${COMPORT}..."
                        fi
@@ -551,6 +555,10 @@ case "${1}" in
                        fi
                fi
 
+               if [ -n "${PPTP_ROUTE}" ]; then
+                       route del ${PPTP_ROUTE}
+               fi
+
                if [ "$DEVICE" != "${GREEN_DEV}" ] && [ "$DEVICE" != "" ]; then
                        link_status=`ip link show $DEVICE.${INET_VLAN} 2> /dev/null`
                        if [ -n "${link_status}" ]; then