zoukankan      html  css  js  c++  java
  • dhcp

    leases 文件

    /var/lib/dhclient/dhclient.leases

    RUN="yes"

    if [ "$RUN" = "yes" ]; then
            echo "$(date): entering ${1%/*}, dumping variables." 
                    >> /tmp/dhclient-script.debug

            # loop over the 4 possible prefixes: (empty), cur_, new_, old_
            for prefix in '' 'cur_' 'new_' 'old_'; do
                    # loop over the DHCP variables passed to dhclient-script
                    for basevar in reason interface medium alias_ip_address 
                                   ip_address host_name network_number subnet_mask 
                                   broadcast_address routers static_routes 
                                   rfc3442_classless_static_routes 
                                   domain_name domain_search domain_name_servers 
                                   netbios_name_servers netbios_scope 
                                   ntp_servers 
                                   ip6_address ip6_prefix ip6_prefixlen 
                                   dhcp6_domain_search dhcp6_name_servers ; do
                            var="${prefix}${basevar}"
                            eval "content=$$var"

                            # show only variables with values set
                            if [ -n "${content}" ]; then
                                    echo "$var='${content}'" >> /tmp/dhclient-script.debug
                            fi
                    done
            done

            echo '--------------------------' >> /tmp/dhclient-script.debug
    fi
  • 相关阅读:
    在mac系统上安装Eclipse,编写java程序
    显示和隐藏Mac隐藏文件的终端命令
    iOS中UIKit——UIDataDetectors(数据检测器)它将电话、邮件、网址等变为链接
    C语言中的关键字
    IOS基础——静态方法(类方法)和实例方法
    IOS基础——alloc、init和new方法
    IOS基础——实例变量四种范围类型
    iOS中UIKit——UIFont得到iOS设备上的系统字体
    iOS中UIKit——UIButton设置边框
    IOS中获取屏幕尺寸
  • 原文地址:https://www.cnblogs.com/jkklearn/p/13442362.html
Copyright © 2011-2022 走看看