⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ppp.src

📁 Modem通讯程序包
💻 SRC
字号:
#!/bin/sh# $Id: ppp.src,v 1.25 1998/02/17 09:53:33 mdejonge Exp $##   $Source: /home/mdejonge/CVS/projects/modem/scripts/ppp.src,v $# $Revision: 1.25 $#    Author: Merijn de Jonge#     Email: mdejonge@wins.uva.nl# #  # # This file is part of the modem communication package.# Copyright (C) 1996-1998  Merijn de Jonge# # This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.# # This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.# # You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.# # ## Note:# pppd uses a lock file to lock the device that it has been. Write# permisson to the directory where lock files are stored (/var/lock# on Redhat systems) is required for pppd to work. On some systems# pppd is not installed setuid root (as is done by default during the# installation of pppd). On these systems pppd might fail to work# because pppd can't create a lock file. This can be corrected by# making pppd setuid root.# Make sure that the programs of the modem communication package are in# PATH. Otherwise, append the directory in which the binaries are installed# to PATH below.PATH=$PATH# PPPD: ppp deamon programPPPD="pppd"# XTERM: name of terminal emulator for X. For example xterm, rxvt dtterm.#        It should understand the '-e' command line option.XTERM=xterm# No changes below PROG=$0export PATHusage(){   /bin/cat <<ENDCAT   ${PROG} (VERSION)   usage:         `basename ${PROG}` [-option ... ] [phone book entry]      where options include:         -h        print out this message         -v        displays version information         -r        automatically redial when line is busy         -q        don't prompt for phone number when it can be                   determined from the entry in your phone book         -l        don't prompt for login/password when it can be                   determined from the entry in your phone bookENDCAT}version(){   echo "ppp version VERSION"}start_ppp(){   # find phonebook entry that is used   for opt in $*   do      case $opt in         -* ) ;;          * ) entry=$opt      esac   done    # get data that has to be sent to the remote host before and after   # logging in. The string "prompt" is reserved and used to start   # an interactive terminal window to communicate with the remote host   # directly.   if [ "a$opt" != "a" ]   then      prelogin=`getitem ${HOME}/.phonebook $entry prelogin`      postlogin=`getitem ${HOME}/.phonebook $entry postlogin`   fi   if [ "a$prelogin" = "aprompt" ]   then      # we need an interacte terminal window to send commands      # interactively before logging into the remote system,      ${XTERM} -e modemtalk -m ${MODEM}   elif [ "a$prelogin" != "a" ]   then      # Send data directly to modem device      printf "$prelogin\n" > ${MODEM}   fi   if eval "modemlogin -m ${MODEM} $*"   then      if [ "a$postlogin" = "aprompt" ]      then         # we need an interacte terminal window to send commands         # interactively after loggnig into the remote system.         ${XTERM} -e modemtalk -m ${MODEM}      elif [ "a$postlogin" != "a" ]      then         # Send data directly to modem device         printf "$postlogin\n" > ${MODEM}      fi      exec ${PPPD} ${MODEM}   fi   exit 1}if [ "a$1" = "astart" ]then   shift;   start_ppp $*else   for opt in $*   do      case $opt in         -h ) usage ; exit 0 ;;         -v ) version ; exit 0 ;;         -r ) MODEMCONTROL_ARG="${MODEMCONTROL_ARG} -r" ;;         -q ) MODEMCONTROL_ARG="${MODEMCONTROL_ARG} -q" ;;         -l ) LOGIN_ARG="${LOGIN_ARG} -l" ;;         *  ) if [ $# -eq 1 ]              then                 MODEMCONTROL_ARG="${MODEMCONTROL_ARG} -e ${opt}"                 LOGIN_ARG="${LOGIN_ARG} -e ${opt}"              else                 EXTRA_ARGS="${EXTRA_ARGS} ${opt}"              fi ;;      esac      shift   done   modemcontrol ${EXTRA_ARGS} ${MODEMCONTROL_ARG} \                "${PROG} start ${EXTRA_ARGS} ${LOGIN_ARG}"fi## EOF scripts/ppp.src#

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -