# slattach -v -b  returns the interface name, e.g. sl0
result=`slattach -b -v -H -p slip ttyzf`
if [ $? != 0 ]; then
  echo "slattach error"
else 
  ifc=`echo $result | cut -f 6 -d \ `
  sleep 1
  ifconfig $ifc 10.0.2.15 netmask 255.255.255.224 broadcast 10.0.2.31 pointopoint 10.0.2.2
  if [ $? = 0 ]; then
    route add -net 10.0.2.0 netmask 255.255.255.224 $ifc
    #add your routes here
  else
    echo "ifconfig error"
  fi
fi
