📄 ip-up
字号:
#!/bin/sh ## This file was created when you ran 'ppp -s'. # # This file /etc/ppp/ip-up is run by pppd when there's a successful ppp # connection. # # Put any commands you want run after a successful connection in this file. # # The companion file is /etc/ppp/ip-down, it's run when the ppp connection # ends. # # The environment is cleared before executing this script so the path must # be reset. # PATH=/usr/bin:/usr/sbin:/usr/X11R6/bin:/sbin:/bin export PATH # This will print to the screen the local & remote ip address when you # make a successful ppp connection. # $4 = Local IP $5 = Remote IP## The CARRIER speed at which you connect will be reported if your modem # reports it. ## You may have to add W2 or S95=1 to your modem init string to get your # modem to report the DCE = CARRIER speed. # Examples: AT&FW2 or AT&FS95=1 #echo $# $@ > /dev/ttyS0#echo $DNS1 $DNS2 > /dev/ttyS0[ ! -z $DNS1 ] && echo "nameserver $DNS1" > /etc/resolv.conf[ ! -z $DNS2 ] && echo "nameserver $DNS2" >> /etc/resolv.confCS="`grep CONNECT /var/log/report-chat 2>/dev/null | cut -b 24-40 2>/dev/null`"#if (echo "$CS $4 > $5 $1" | /usr/X11R6/bin/xmessage -display $HOSTNAME:0.0 -file - 2>/dev/null); then#: #else echo "$CS $4 > $5 $1" >/dev/ttyS0 #fi #End!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -