dhclient-script (219739) | dhclient-script (228259) |
---|---|
1#!/bin/sh 2# 3# $OpenBSD: dhclient-script,v 1.6 2004/05/06 18:22:41 claudio Exp $ | 1#!/bin/sh 2# 3# $OpenBSD: dhclient-script,v 1.6 2004/05/06 18:22:41 claudio Exp $ |
4# $FreeBSD: head/sbin/dhclient/dhclient-script 219739 2011-03-18 12:23:20Z ume $ | 4# $FreeBSD: head/sbin/dhclient/dhclient-script 228259 2011-12-04 14:44:31Z dumbbell $ |
5# 6# Copyright (c) 2003 Kenneth R Westerback <krw@openbsd.org> 7# 8# Permission to use, copy, modify, and distribute this software for any 9# purpose with or without fee is hereby granted, provided that the above 10# copyright notice and this permission notice appear in all copies. 11# 12# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 183 unchanged lines hidden (view full) --- 196 # $new_domain_name and $new_domain_name_servers were provided. PR 197 # #3135 reported some ISP's only provide $new_domain_name_servers and 198 # thus broke the script. This code creates the resolv.conf if either 199 # are provided. 200 201 local tmpres=/var/run/resolv.conf.${interface} 202 rm -f $tmpres 203 | 5# 6# Copyright (c) 2003 Kenneth R Westerback <krw@openbsd.org> 7# 8# Permission to use, copy, modify, and distribute this software for any 9# purpose with or without fee is hereby granted, provided that the above 10# copyright notice and this permission notice appear in all copies. 11# 12# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 183 unchanged lines hidden (view full) --- 196 # $new_domain_name and $new_domain_name_servers were provided. PR 197 # #3135 reported some ISP's only provide $new_domain_name_servers and 198 # thus broke the script. This code creates the resolv.conf if either 199 # are provided. 200 201 local tmpres=/var/run/resolv.conf.${interface} 202 rm -f $tmpres 203 |
204 if [ -n "$new_domain_name" ]; then | 204 if [ -n "$new_domain_search" ]; then 205 echo "search $new_domain_search" >>$tmpres 206 elif [ -n "$new_domain_name" ]; then |
205 echo "search $new_domain_name" >>$tmpres 206 fi 207 208 if [ -n "$new_domain_name_servers" ]; then 209 for nameserver in $new_domain_name_servers; do 210 echo "nameserver $nameserver" >>$tmpres 211 done 212 fi --- 193 unchanged lines hidden --- | 207 echo "search $new_domain_name" >>$tmpres 208 fi 209 210 if [ -n "$new_domain_name_servers" ]; then 211 for nameserver in $new_domain_name_servers; do 212 echo "nameserver $nameserver" >>$tmpres 213 done 214 fi --- 193 unchanged lines hidden --- |