_cmd | awk '{print $2}'` ifconfig $ifc up route add default $1 1 >/dev/null ping $1
8. 写个如下的 shell script, 把它叫 "detach", 挑个你喜欢的地方放
#!/bin/sh ifc_cmd=`egrep "^ifconfig.*$1" /etc/asppp.cf` ifc=`echo $ifc_cmd | awk '{print $2}'` if [ -n "`ifconfig -a | grep $ifc`" ] then ifconfig $ifc down id=`ps -e | grep aspppd | awk '{print $1}` if test -n "$id" then kill -1 $id fi ifconfig $ifc unplumb fi eval $ifc_cmd exit 0
把 attach 与 detach 所在的目录加进你的 $PATH 中 重新开机後, 就大功告成了, 用 "attach nctu"/"detach nctu" 就可以连接/切断与交大 terminal server 的 ppp
NOTE: Solaris 2.4 的 PPP 没有 implement PAP, 所以若您拨接 SeedNet 的 PPP 请安装 dp(ftp://nctuccca.edu.tw/UNIX/networking/ppp/dp/ )
Bibliography: 1. Peter Block , "Solaris 2.4, PPP and dynamic a上一页 [1] [2] [3] [4] [5] 下一页 |