update to b2
[mpls-ppp.git] / scripts / ppp-on-rsh
blob30a50dba63edd2f2e7de7f3cd50595004fed03f5
1 #!/bin/sh
3 # A sample script to establish PPP session(s) via rsh
5 # Adi Masputra <adi.masputra@sun.com>
6 # Jan 24, 2000
10 # You'd definitely want to change the following addresses to suit
11 # your network configuration
13 LOC_IP=10.0.0.1
14 REM_IP=10.0.0.2
15 NETMASK=255.255.0.0
17 export LOC_IP REM_IP
20 # This is the remote peer where in.rshd is running, either
21 # its hostname or IP address
23 PPPD_RHOST=myremotehost
26 # For this example, we assume that pppd on both local and remote
27 # machines reside in the same place, /usr/local/bin/pppd
29 PPPD_LOC=/usr/local/bin/pppd
32 # The location of local options file (where rsh client is running).
33 # Note that the sample options file included in the distribution
34 # may need further customizations, depending on your needs. The 'noauth'
35 # option specified in the file is there to simplify the example. In
36 # reality, you'd probably want to remove such option.
38 PPPD_LOC_OPT=/etc/ppp/options-rsh-loc
41 # The location of remote options file (where in.rshd daemon is running).
42 # Note that the sample options file included in the distribution
43 # may need further customizations, depending on your needs. The 'noauth'
44 # option specified in the file is there to simplify the example. In
45 # reality, you'd probably want to remove such option. Also note that
46 # the remote options file need to include the 'notty' option for this
47 # to work
49 PPPD_REM_OPT=/etc/ppp/options-rsh-rem
52 # The location of rsh client on the local machine
54 RSH_LOC=/bin/rsh
56 export PPPD_LOC PPPD_LOC_OPT PPPD_REM_OPT PPPD_RHOST RSH_LOC
59 # Uncomment the following to enable IPv6, note that the IPv6 support
60 # needs to be enabled during compilation
62 # PPPD_IPV6='+ipv6 ipv6cp-use-ipaddr'
63 export PPPD_IPV6
66 # And execute pppd with the pty option, specifying rsh client as the
67 # slave side of the pseduo-tty master/slave pair.
69 exec $PPPD_LOC \
70 pty '$RSH_LOC $PPPD_RHOST $PPPD_LOC $REM_IP:$LOC_IP $PPPD_IPV6 file $PPPD_REM_OPT' \
71 $LOC_IP:$REM_IP netmask $NETMASK $PPPD_IPV6 file $PPPD_LOC_OPT