#! /bin/sh
# Put any local setup commands in here

echo ""

# --- slip link to IPIP daemon
#
echo "Configuring SLIP on ptypf --- IPIP daemon..."
/sbin/slattach -s 38400 -p slip ptypf &
/sbin/ifconfig sl0 44.102.48.2 netmask 255.0.0.0 mtu 1024
/sbin/route add -net 44.0.0.0 netmask 255.0.0.0 dev sl0
#

# --- slip link to NOS
#
echo "Configuring SLIP on ptype --- NOS..."
/sbin/slattach -s 38400 -p slip ptype &
/sbin/ifconfig sl1 44.102.48.2 netmask 255.255.0.0 mtu 1024
/sbin/route add -host 44.102.48.1 dev sl1
/sbin/route add -net 44.102.0.0 gw 44.102.48.1 netmask 255.255.0.0 dev sl1
/sbin/route add -net 44.135.83.0 gw 44.102.48.1 netmask 255.255.255.0 dev sl1
#

# --- local addresses to loopback
#  (not really needed, but sometimes it is)
#
/sbin/route add -host 141.217.1.8 dev lo
/sbin/route add -host 44.102.48.2 dev lo

# --- start IPIP daemon
#   (use the while: do; done;  statement to restart the IPIP
#     daemon even if you kill the process or it crashes)
#
echo "Starting IPIP daemon..."
while :; 
 do /ipip/ipip -c /ipip/ipip.config -r /ipip/ipip.routes -s 0 -np -nts ;
done & 

# done
