V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
gouera
V2EX  ›  Linux

脚本退出的问题

  •  
  •   gouera · Apr 1, 2014 · 3639 views
    This topic created in 4412 days ago, the information mentioned may be changed or developed.
    本意是写一个开机自动拨VPN的脚本
    但是运行到最后总是会出错,不知道为什么
    下面是我的脚本内容:

    /usr/sbin/xl2tpd
    echo "c fs">/var/run/xl2tpd/l2tp-control
    while true ;do
    ifconfig ppp0 >>/dev/null
    if [ $? -eq 0 ] ;then
    sleep 2
    /sbin/route add -net 1.1.1.1 netmask 255.255.255.255 dev ppp0
    exit 0
    fi
    done

    但是运行到最后退出的时候总是会提示网络已关闭
    求问这是为什么
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2462 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:10 · PVG 12:10 · LAX 21:10 · JFK 00:10
    ♥ Do have faith in what you're doing.