]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/initscripts/init.d/networking/red
Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next
[ipfire-2.x.git] / src / initscripts / init.d / networking / red
index 0c41663e97d74448462ec0e5d6fb7de31d8836ec..421c6f68421da9b826dea3e96f21108610ce62cb 100644 (file)
@@ -120,8 +120,8 @@ case "${1}" in
                        echo -n "${DEVICE}" > /var/ipfire/red/iface
                        echo -n "${ADDRESS}"  > /var/ipfire/red/local-ipaddress
                        echo -n "${GATEWAY}" > /var/ipfire/red/remote-ipaddress
-                       grep -v "gateway" /etc/hosts > /tmp/hosts
-                       echo "$GATEWAY gateway"  >> /tmp/hosts
+                       grep -v -E "\<gateway\>" /etc/hosts > /tmp/hosts
+                       echo "$GATEWAY  gateway"  >> /tmp/hosts
                        mv /tmp/hosts /etc/hosts
                        echo -n "${DNS1}" > /var/ipfire/red/dns1
                        echo -n "${DNS2}" > /var/ipfire/red/dns2
@@ -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
@@ -454,7 +458,7 @@ case "${1}" in
                        PPP_STD_OPTIONS+=" default-asyncmap hide-password nodetach mtu ${MTU}"
                        PPP_STD_OPTIONS+=" mru ${MRU} noaccomp nodeflate nopcomp novj novjccomp"
                        PPP_STD_OPTIONS+=" nobsdcomp user ${USERNAME} lcp-echo-interval 20"
-                       PPP_STD_OPTIONS+=" lcp-echo-failure 3 ${AUTH}"
+                       PPP_STD_OPTIONS+=" lcp-echo-failure 5 ${AUTH}"
                                
                        ### Debugging
                        #
@@ -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