xref: /dflybsd-src/share/examples/startslip/slup.sh (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino#!/bin/sh
286d7f5d3SJohn Marinomyname=<my.ip.address>
386d7f5d3SJohn Marinogateway=<gateway.ip.address>
486d7f5d3SJohn Marinonetmask=255.255.255.248
586d7f5d3SJohn Marinotune1="link0 -link2"    # force headers compression
686d7f5d3SJohn Marinotune2="mtu 296"         # for FreeBSD 1.x host
786d7f5d3SJohn Marino
886d7f5d3SJohn Marinocase $LINE in
986d7f5d3SJohn Marino	0) tune=$tune1;;        # 1st phone connected
1086d7f5d3SJohn Marino	1) tune=$tune2;;        # 2nd phone connected
1186d7f5d3SJohn Marino	*) tune=;;              # others
1286d7f5d3SJohn Marinoesac
1386d7f5d3SJohn Marino
1486d7f5d3SJohn Marino/sbin/ifconfig $1 $2 $tune
1586d7f5d3SJohn Marino/sbin/ifconfig $1 inet $myname $gateway netmask $netmask
1686d7f5d3SJohn Marino/sbin/route add default $gateway
17