fix typo and add override for netmask when using pptp with dhcp (needed for some...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 6 Sep 2005 13:14:54 +0000 (13:14 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 6 Sep 2005 13:14:54 +0000 (13:14 +0000)
SVN-Revision: 1859

openwrt/package/pptp/files/ifup.pptp

index 9de87feebd3ef38485ebda957d063abc5fdfa74a..15178fe302b11aca9054bbc3f7b704b4bae0c0a3 100644 (file)
@@ -25,6 +25,11 @@ while :; do
        MTU=${MTU:+ mtu $MTU mru $MTU}
 
        do_ifup $PPTP_PROTO $type
+       
+       # hack for some buggy ISPs
+       NETMASK=$(nvram get ${type}_netmask)
+       IFNAME=$(nvram get pptp_ifname)
+       [ -z "$NETMASK" -o -z "$IFNAME" ] || ifconfig $IFNAME netmask $NETMASK
 
        /usr/sbin/pppd nodetach \
                pty "/usr/sbin/pptp $IP --loglevel 0 --nolaunchpppd" \
@@ -38,7 +43,6 @@ while :; do
                password "$PASSWORD" \
                $MTU \
                $IDLETIME \
-               $REDIAL \
-               $IFNAME
+               $REDIAL
 done &