#!/bin/sh## simplified dhclient-script for NeXTSTEP/OPENSTEP## removed a lot of the cruft from the netbsd version since NeXTSTEP doesn't# support aliases and lots of things were breaking for no good reason## 14 Sep 1997, David W. Young#if [ x$reason = xPREINIT ]; thenifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 up >/dev/null 2>&1exit 0fiif [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; thencurrent_hostname=`hostname`if [ x$current_hostname = x ] || \[ x$current_hostname = x$old_host_name ]; thenif [ x$current_hostname = x ] || \[ x$new_host_name != x$old_host_name ]; thenhostname $new_host_namefifiif [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]thenifconfig $interface $new_ip_address netmask $new_subnet_mask \>/dev/null 2>&1route add $new_ip_address 127.1 0 >/dev/null 2>&1for router in $new_routers ; doroute add default $router 1 >/dev/null 2>&1donefiif [ x"$new_domain_name_servers" != x ]; thencat /dev/null > /etc/resolv.conf.dhclientif [ "x$new_domain_search" != x ]; thenecho search $new_domain_search >> /etc/resolv.conf.dhclientelif [ "x$new_domain_name" != x ]; then# Note that the DHCP 'Domain Name Option' is really just a domain# name, and that this practice of using the domain name option as# a search path is both nonstandard and deprecated.echo search $new_domain_name >> /etc/resolv.conf.dhclientfifor nameserver in $new_domain_name_servers; doecho nameserver $nameserver >>/etc/resolv.conf.dhclientdonemv /etc/resolv.conf.dhclient /etc/resolv.conffiexit 0fiif [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \|| [ x$reason = xSTOP ]; thenif [ x$old_ip_address != x ]; thenroute delete $old_ip_address 127.1 >/dev/null 2>&1for $router in $old_routers ; doroute delete default $router >/dev/null 2>&1donefiexit 0fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。