ip-up脚本参数
#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
# Only the link to Newman requires this handling.
#
# When the ppp link comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
#
SCRIPTS
Pppd invokes scripts at various stages in its processing which can be
used to perform site-specific ancillary processing. These scripts are
usually shell scripts, but could be executable code files instead.
Pppd does not wait for the scripts to finish. The scripts are exe-
cuted as root (with the real and effective user-id set to 0), so that
they can do things such as update routing tables or run privileged
daemons. Be careful that the contents of these scripts do not compro-
mise your system’s security. Pppd runs the scripts with standard
input, output and error redirected to /dev/null, and with an environ-
ment that is empty except for some environment variables that give
information about the link. The environment variables that pppd sets
are:
DEVICE The name of the serial tty device being used.
IFNAME The name of the network interface being used.
IPLOCAL
The IP address for the local end of the link. This is only set
when IPCP has come up.
IPREMOTE
The IP address for the remote end of the link. This is only
set when IPCP has come up.
PEERNAME
The authenticated name of the peer. This is only set if the
peer authenticates itself.
SPEED The baud rate of the tty device.
ORIG_UID
The real user-id of the user who invoked pppd.
PPPLOGNAME
The username of the real user-id that invoked pppd. This is
always set.
For the ip-down and auth-down scripts, pppd also sets the following
variables giving statistics for the connection:
CONNECT_TIME
The number of seconds from when the PPP negotiation started
until the connection was terminated.
BYTES_SENT
The number of bytes sent (at the level of the serial port) dur-
ing the connection.
BYTES_RCVD
The number of bytes received (at the level of the serial port)
during the connection.
LINKNAME
The logical name of the link, set with the linkname option.
DNS1 If the peer supplies DNS server addresses, this variable is set
to the first DNS server address supplied.
DNS2 If the peer supplies DNS server addresses, this variable is set
to the second DNS server address supplied.
Pppd invokes the following scripts, if they exist. It is not an error
if they don’t exist.
ip-up脚本参数的更多相关文章
- python注释、脚本参数、字节码
python注释.脚本参数.字节码 --道心 python安装 1.下载安装包 https://www.python.org/downloads/ 2.安装 默认安装路径:C:\python27 3. ...
- linux下TCP/IP及内核参数优化调优(转)
Linux下TCP/IP及内核参数优化有多种方式,参数配置得当可以大大提高系统的性能,也可以根据特定场景进行专门的优化,如TIME_WAIT过高,DDOS攻击等等. 如下配置是写在sysctl.con ...
- Linux内核 TCP/IP、Socket参数调优
Linux内核 TCP/IP.Socket参数调优 2014-06-06 Harrison.... 阅 9611 转 165 转藏到我的图书馆 微信分享: Doc1: /proc/sy ...
- jquery 、 JS 脚本参数的认识与使用
jquery . JS 脚本参数的认识与使用 如何使用jquery刷新当前页面 下面介绍全页面刷新方法:有时候可能会用到 window.location.reload(); //刷新当前页面. par ...
- 对于shell脚本参数获取时的一点小技巧
问题如下: 根据脚本参数的个数$#进行一个循环,在依次输出每个参数$1 $2 $3...... 我有一个循环变量i $i 取到这时的i为1,我想使用这个1再去调用$1,也是就是打印出第一个参数 就是$ ...
- TCP/IP及内核参数优化调优
Linux下TCP/IP及内核参数优化有多种方式,参数配置得当可以大大提高系统的性能,也可以根据特定场景进行专门的优化,如TIME_WAIT过高,DDOS攻击等等.如下配置是写在sysctl.conf ...
- Linux下批量ping某个网段ip的脚本
比如现在需要对172.16.50.0/24网段的ip进行检查,检查哪些ip现在被占用,哪些ip没有被占用,可以通过ping命令来检查,脚本如下: [root@uatdns01 opt]# vim /o ...
- shell脚本参数中有空格
shell脚本参数中有空格 在shell脚本中如果有空格的处理如下: sh test.sh "hello word" echo $1 得到的是hello,而不是hello word ...
- Linux TCP/IP调优参数 /proc/sys/net/目录
所有的TCP/IP调优参数都位于/proc/sys/net/目录. 例如, 下面是最重要的一些调优参数,后面是它们的含义: /proc/sys/net/core/rmem_default " ...
- 写了个爬虫代理ip的脚本给大家使用
写了个爬虫代理ip的脚本给大家使用 一.代码 import requests from lxml.html import etree url = 'http://www.kuaidaili.com/f ...
随机推荐
- 从零开始:Mysql基于Amoeba的集群搭建
从零开始:Mysql基于Amoeba的集群搭建 准备环境 1.mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz 2.amoeba-mysql-binary-2.0. ...
- 怎样查询Vultr当月账单和历史账单
关于Vultr账单的问题,Vultr是可以查看当月的实时账单,也可以查看历史账单,下面就教大家查看账单的方法. 一.查看Vultr当月账单 首先我们要进入Vultr官网,登录自己的Vultr账号,登录 ...
- Android开发 navigation入门详解
前言 Google 在2018年推出了 Android Jetpack,在Jetpack里有一种管理fragment的新架构模式,那就是navigation. 字面意思是导航,但是除了做APP引导页面 ...
- UVA-699-The Falling Leaves-二叉树+递归
Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on ...
- Google Chrome浏览器安装xpath helper插件
1. 图中桌面的两个2.0.2_0文件就是xpath helper插件. --------------------------------------------------------------- ...
- 【转载】flex布局超过显示省略号
<div class="main"> <div class="content"> <h4 class="name&quo ...
- 历经小半宿吧。哎,终于搭建好了Linux-C的环境
小小地庆祝一下吧 继续努力学习,把Linux-C熟悉一下,争取做到会用吧... 我想应该不难 我熟悉的 iostream 还存在 可惜,微软基础类库不在了...
- 跳过爱奇艺优酷vip
1.google chrome浏览器 2.下载插件安装 Tampermonkey https://pan.baidu.com/s/1qvRQD2UO6gPHogjtSUBwUw 将 ...
- [转]使用TortoiseGit处理代码冲突
场景一 user0 有新提交 user1 没有pull -> 写新代码 -> pull -> 提示有冲突 解决办法一 -> stash save(把自己的代码隐藏存起来) ...
- jvisualvm 工具使用【转】
VisualVM 是Netbeans的profile子项目,已在JDK6.0 update 7 中自带(java启动时不需要特定参数,监控工具在bin/jvisualvm.exe). https:// ...