系统管理指南:网络服务

运行 asppp2pppd 转换脚本(任务)

/usr/sbin/asppp2pppd 脚本将 /etc/asppp.cf 和与 PPP 相关的 UUCP 文件中的 PPP 信息复制到 Solaris PPP 4.0 文件中的相应位置。

任务先决条件

在执行下一任务之前,必须完成以下操作:

Procedure如何从 asppp 转换为 Solaris PPP 4.0

  1. 启动转换脚本。


    # /usr/sbin/asppp2pppd
    

    将启动转换过程,并显示以下屏幕输出。


    This script provides only a suggested translation for your existing aspppd
    
    configuration.  You will need to evaluate for yourself whether the translation
    
    is appropriate for your operating environment.
    
    Continue [Yn]? 
  2. 键入 "Y" 以继续。

    将显示以下输出。


    Chat cannot do echo checking; requests for this removed.
    
    Adding 'noauth' to /etc/ppp/options
    
    
    
    Preparing to write out translated configuration:
    
        1 chat file:
    
            1.  /etc/ppp/chat.Pgobi.hayes
    
        2 option files:
    
            2.  /etc/ppp/peers/Pgobi
    
            3.  /etc/ppp/options
    
        1 script file:
    
            4.  /etc/ppp/demand

    新的 Solaris PPP 4.0 文件已生成。

Procedure如何查看转换结果

您可以在转换过程结束时查看由 /usr/sbin/asppp2pppd 转换脚本创建的 Solaris PPP 4.0 文件。该脚本显示以下选项列表。


Enter option number:

        1 - view contents of file on standard output

        2 - view contents of file using /usr/bin/less

        3 - edit contents of file using /usr/bin/vi

        4 - delete/undelete file from list

        5 - rename file in list

        6 - show file list again

        7 - escape to shell (or "!")

        8 - abort without saving anything

        9 - save all files and exit (default)

Option:
  1. 键入 1 以查看屏幕上文件的内容。

    脚本会要求提供所要查看的文件的编号。


    File number (1 .. 4):

    这些编号表示转换过程中列出的已转换文件,如前面的步骤 2 中所示。

  2. 键入 1 以查看聊天文件 /etc/ppp/chat.Pgobi.hayes


    File number (1 .. 4):  1
    
    "" \d\dA\p\pTE1V1X1Q0S2=255S12=255\r\c
    
    OK\r ATDT\T\r\c
    
    CONNECT \c
    
    in:--in: mojave
    
    word: sand

    聊天脚本包含 /etc/uucp/Dialers 文件样例的 hayes 行中显示的调制解调器“聊天”信息。/etc/ppp/chat.Pgobi.hayes 还包含 /etc/uucp/Systems 文件样例中显示的 Pgobi 的登录序列。聊天脚本现在已位于 /etc/ppp/chat.Pgobi.hayes 文件中。

  3. 键入 2 以查看对等点文件 /etc/ppp/peers/Pgobi


    File number (1 .. 4):  2
    
    /dev/cua/b
    
    38400
    
    demand
    
    idle 120
    
    connect "/usr/bin/chat -f /etc/ppp/chat.Pgobi.hayes -T '15551212'"
    
    user NeverAuthenticate
    
    mojave:gobi

    串行端口信息 (/dev/cua/b) 来自 /etc/uucp/Devices 文件。链路速度、空闲时间、验证信息和对等点名称来自 /etc/asppp.cf 文件。"demand" 表示 "demand" 脚本,将在拨出计算机尝试连接到对等点 Pgobi 时调用。

  4. 键入 3 以查看为拨出计算机 mojave 创建的 /etc/ppp/options 文件。


    File number (1 .. 4):  3
    
    #lock
    
    noauth

    /etc/ppp/options 中的信息来自 /etc/asppp.cf 文件。

  5. 键入 4 以查看 demand 脚本的内容。


    File number (1 .. 4):  4
    
    /usr/bin/pppd file /etc/ppp/peers/Pgobi

    调用此脚本时将运行 pppd 命令,接着此命令将读取 /etc/ppp/peers/Pgobi 以启动 mojavePgobi 之间的链路。

  6. 键入 9 以保存已创建的文件。然后退出转换脚本。